(()=>{
    "use strict";
    var e = {
        599: (e,t,i)=>{
            i.d(t, {
                Z: ()=>a
            });
            var n = i(2585)
              , o = i.n(n)
              , s = i(4725)
              , r = i.n(s)()(o());
            r.push([e.id, "/* Copyright (C) Microsoft Corporation. All rights reserved. */\r\n\r\n.msreadout-word-highlight:not(.msreadout-inactive-highlight) {\r\n    background: #ffff00 !important;\r\n    color: black !important;\r\n}\r\n\r\n.msreadout-line-highlight:not(.msreadout-inactive-highlight) {\r\n    background: #b2d6f3 !important;\r\n    color: black !important;\r\n}\r\n\r\n@media screen and (-ms-high-contrast: active) {\r\n    .msreadout-word-highlight:not(.msreadout-inactive-highlight) {\r\n        -ms-high-contrast-adjust: none;\r\n        background-color: Highlight !important;\r\n        color: HighlightText !important;\r\n    }\r\n\r\n    .msreadout-line-highlight:not(.msreadout-inactive-highlight) {\r\n        -ms-high-contrast-adjust: none;\r\n        background: yellow !important;\r\n        color: black !important;\r\n    }\r\n}", "", {
                version: 3,
                sources: ["webpack://./../../css/read_out_loud_web.css"],
                names: [],
                mappings: "AAAA,8DAA8D;;AAE9D;IACI,8BAA8B;IAC9B,uBAAuB;AAC3B;;AAEA;IACI,8BAA8B;IAC9B,uBAAuB;AAC3B;;AAEA;IACI;QACI,8BAA8B;QAC9B,sCAAsC;QACtC,+BAA+B;IACnC;;IAEA;QACI,8BAA8B;QAC9B,6BAA6B;QAC7B,uBAAuB;IAC3B;AACJ",
                sourcesContent: ["/* Copyright (C) Microsoft Corporation. All rights reserved. */\r\n\r\n.msreadout-word-highlight:not(.msreadout-inactive-highlight) {\r\n    background: #ffff00 !important;\r\n    color: black !important;\r\n}\r\n\r\n.msreadout-line-highlight:not(.msreadout-inactive-highlight) {\r\n    background: #b2d6f3 !important;\r\n    color: black !important;\r\n}\r\n\r\n@media screen and (-ms-high-contrast: active) {\r\n    .msreadout-word-highlight:not(.msreadout-inactive-highlight) {\r\n        -ms-high-contrast-adjust: none;\r\n        background-color: Highlight !important;\r\n        color: HighlightText !important;\r\n    }\r\n\r\n    .msreadout-line-highlight:not(.msreadout-inactive-highlight) {\r\n        -ms-high-contrast-adjust: none;\r\n        background: yellow !important;\r\n        color: black !important;\r\n    }\r\n}"],
                sourceRoot: ""
            }]);
            const a = r
        }
        ,
        4725: e=>{
            e.exports = function(e) {
                var t = [];
                return t.toString = function() {
                    return this.map((function(t) {
                        var i = ""
                          , n = void 0 !== t[5];
                        return t[4] && (i += "@supports (".concat(t[4], ") {")),
                        t[2] && (i += "@media ".concat(t[2], " {")),
                        n && (i += "@layer".concat(t[5].length > 0 ? " ".concat(t[5]) : "", " {")),
                        i += e(t),
                        n && (i += "}"),
                        t[2] && (i += "}"),
                        t[4] && (i += "}"),
                        i
                    }
                    )).join("")
                }
                ,
                t.i = function(e, i, n, o, s) {
                    "string" == typeof e && (e = [[null, e, void 0]]);
                    var r = {};
                    if (n)
                        for (var a = 0; a < this.length; a++) {
                            var d = this[a][0];
                            null != d && (r[d] = !0)
                        }
                    for (var l = 0; l < e.length; l++) {
                        var u = [].concat(e[l]);
                        n && r[u[0]] || (void 0 !== s && (void 0 === u[5] || (u[1] = "@layer".concat(u[5].length > 0 ? " ".concat(u[5]) : "", " {").concat(u[1], "}")),
                        u[5] = s),
                        i && (u[2] ? (u[1] = "@media ".concat(u[2], " {").concat(u[1], "}"),
                        u[2] = i) : u[2] = i),
                        o && (u[4] ? (u[1] = "@supports (".concat(u[4], ") {").concat(u[1], "}"),
                        u[4] = o) : u[4] = "".concat(o)),
                        t.push(u))
                    }
                }
                ,
                t
            }
        }
        ,
        2585: e=>{
            e.exports = function(e) {
                var t = e[1]
                  , i = e[3];
                if (!i)
                    return t;
                if ("function" == typeof btoa) {
                    var n = btoa(unescape(encodeURIComponent(JSON.stringify(i))))
                      , o = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n)
                      , s = "/*# ".concat(o, " */");
                    return [t].concat([s]).join("\n")
                }
                return [t].join("\n")
            }
        }
        ,
        7648: (e,t,i)=>{
            var n, o = function() {
                var e = {};
                return function(t) {
                    if (void 0 === e[t]) {
                        var i = document.querySelector(t);
                        if (window.HTMLIFrameElement && i instanceof window.HTMLIFrameElement)
                            try {
                                i = i.contentDocument.head
                            } catch (e) {
                                i = null
                            }
                        e[t] = i
                    }
                    return e[t]
                }
            }(), s = [];
            function r(e) {
                for (var t = -1, i = 0; i < s.length; i++)
                    if (s[i].identifier === e) {
                        t = i;
                        break
                    }
                return t
            }
            function a(e, t) {
                for (var i = {}, n = [], o = 0; o < e.length; o++) {
                    var a = e[o]
                      , d = t.base ? a[0] + t.base : a[0]
                      , l = i[d] || 0
                      , u = "".concat(d, " ").concat(l);
                    i[d] = l + 1;
                    var c = r(u)
                      , h = {
                        css: a[1],
                        media: a[2],
                        sourceMap: a[3]
                    };
                    -1 !== c ? (s[c].references++,
                    s[c].updater(h)) : s.push({
                        identifier: u,
                        updater: _(h, t),
                        references: 1
                    }),
                    n.push(u)
                }
                return n
            }
            function d(e) {
                var t = document.createElement("style")
                  , n = e.attributes || {};
                if (void 0 === n.nonce) {
                    var s = i.nc;
                    s && (n.nonce = s)
                }
                if (Object.keys(n).forEach((function(e) {
                    t.setAttribute(e, n[e])
                }
                )),
                "function" == typeof e.insert)
                    e.insert(t);
                else {
                    var r = o(e.insert || "head");
                    if (!r)
                        throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
                    r.appendChild(t)
                }
                return t
            }
            var l, u = (l = [],
            function(e, t) {
                return l[e] = t,
                l.filter(Boolean).join("\n")
            }
            );
            function c(e, t, i, n) {
                var o = i ? "" : n.media ? "@media ".concat(n.media, " {").concat(n.css, "}") : n.css;
                if (e.styleSheet)
                    e.styleSheet.cssText = u(t, o);
                else {
                    var s = document.createTextNode(o)
                      , r = e.childNodes;
                    r[t] && e.removeChild(r[t]),
                    r.length ? e.insertBefore(s, r[t]) : e.appendChild(s)
                }
            }
            function h(e, t, i) {
                var n = i.css
                  , o = i.media
                  , s = i.sourceMap;
                if (o ? e.setAttribute("media", o) : e.removeAttribute("media"),
                s && "undefined" != typeof btoa && (n += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s)))), " */")),
                e.styleSheet)
                    e.styleSheet.cssText = n;
                else {
                    for (; e.firstChild; )
                        e.removeChild(e.firstChild);
                    e.appendChild(document.createTextNode(n))
                }
            }
            var g = null
              , m = 0;
            function _(e, t) {
                var i, n, o;
                if (t.singleton) {
                    var s = m++;
                    i = g || (g = d(t)),
                    n = c.bind(null, i, s, !1),
                    o = c.bind(null, i, s, !0)
                } else
                    i = d(t),
                    n = h.bind(null, i, t),
                    o = function() {
                        !function(e) {
                            if (null === e.parentNode)
                                return !1;
                            e.parentNode.removeChild(e)
                        }(i)
                    }
                    ;
                return n(e),
                function(t) {
                    if (t) {
                        if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap)
                            return;
                        n(e = t)
                    } else
                        o()
                }
            }
            e.exports = function(e, t) {
                (t = t || {}).singleton || "boolean" == typeof t.singleton || (t.singleton = (void 0 === n && (n = Boolean(window && document && document.all && !window.atob)),
                n));
                var i = a(e = e || [], t);
                return function(e) {
                    if (e = e || [],
                    "[object Array]" === Object.prototype.toString.call(e)) {
                        for (var n = 0; n < i.length; n++) {
                            var o = r(i[n]);
                            s[o].references--
                        }
                        for (var d = a(e, t), l = 0; l < i.length; l++) {
                            var u = r(i[l]);
                            0 === s[u].references && (s[u].updater(),
                            s.splice(u, 1))
                        }
                        i = d
                    }
                }
            }
        }
        ,
        7951: (e,t,i)=>{
            i.r(t),
            i.d(t, {
                default: ()=>r
            });
            var n = i(7648)
              , o = i.n(n)
              , s = i(599);
            o()(s.Z, {
                insert: "head",
                singleton: !1
            });
            const r = s.Z.locals || {}
        }
        ,
        8366: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.DomUtilties = void 0;
            const n = i(9762);
            !function(e) {
                const t = ["button", "input", "select"];
                e.MSNArticleReadAloudWebHighlighterStyle = ".msreadout-word-highlight:not(.msreadout-inactive-highlight)\n        {background: #ffff00 !important;color: black !important;} .msreadout-line-highlight:not(.msreadout-inactive-highlight)\n        {background: #b2d6f3 !important;color: black !important;}\n        @media screen and (-ms-high-contrast: active) {\n        .msreadout-word-highlight:not(.msreadout-inactive-highlight) {\n        -ms-high-contrast-adjust: none;\n        background-color: Highlight !important;\n        color: HighlightText !important;\n        }\n        .msreadout-line-highlight:not(.msreadout-inactive-highlight) {\n        -ms-high-contrast-adjust: none;\n        background: yellow !important;\n        color: black !important;\n        }\n    }",
                e.getTextNodeFromPoint = function(e, t, i, n) {
                    var o = e.elementFromPoint(t, i);
                    if (o) {
                        var s = e.createTreeWalker(e.body, NodeFilter.SHOW_TEXT);
                        s.currentNode = o;
                        for (var r = s.nextNode(), a = e.createRange(); r; ) {
                            if (a.selectNode(r),
                            n(a).bottom > i)
                                return r;
                            r = s.nextNode()
                        }
                    }
                    return null
                }
                ,
                e.getOffsetInTextNodeForLineAtYPosition = function(e, t, i, n) {
                    for (var o, s = e.createRange(), r = 0, a = t.textContent.length; r !== a; )
                        o = Math.floor(r + (a - r) / 2),
                        s.setStart(t, o),
                        s.collapse(!0),
                        n(s).bottom > i ? a = o : r = o + 1;
                    return r
                }
                ,
                e.addReleasableDomEventListener = function(e, t, i, n=!0) {
                    return e.addEventListener(t, i, {
                        passive: n
                    }),
                    {
                        release: ()=>{
                            e.removeEventListener(t, i)
                        }
                    }
                }
                ,
                e.redrawDom = function(e) {
                    e.body.offsetHeight
                }
                ,
                e.isValidTextNode = function(e) {
                    return n.StringUtilities.NONEMPTY_STRING_REGEX.test(e.textContent)
                }
                ,
                e.isChildOfUserInterfaceNode = function(e) {
                    let i = e.parentElement
                      , n = 5;
                    for (; i && n; ) {
                        let e;
                        n--;
                        const o = i.tagName.toLowerCase();
                        for (e of t)
                            if (o === e)
                                return !1;
                        i = i.parentElement
                    }
                    return !0
                }
                ,
                e.isInDocument = function(e, t, i) {
                    if (t) {
                        for (var n = e; n && n.parentNode; ) {
                            if (n.parentNode === document)
                                return !0;
                            n = n.parentNode instanceof DocumentFragment ? n.parentNode.host : n.parentNode
                        }
                        return !1
                    }
                    return i.contains(e)
                }
                ,
                e.addRemoveStyleToShadowRoot = function(e, t) {
                    if (!t)
                        return {
                            value: ()=>t,
                            release: ()=>{}
                        };
                    var i = document.createElement("style");
                    return i.textContent = e,
                    t.append(i),
                    {
                        value: ()=>t,
                        release: ()=>{
                            t.removeChild(i)
                        }
                    }
                }
            }(t.DomUtilties || (t.DomUtilties = {}))
        }
        ,
        864: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.EventSource = void 0,
            t.EventSource = class {
                constructor() {
                    this._subscribers = []
                }
                subscribe(e) {
                    var t = !1
                      , i = i=>{
                        t || e(i)
                    }
                    ;
                    return this._subscribers.push(i),
                    {
                        release: ()=>{
                            t = !0;
                            var e = this._subscribers.indexOf(i);
                            e > -1 && this._subscribers.splice(e, 1)
                        }
                    }
                }
                trigger(e) {
                    for (var t = this._subscribers.slice(0), i = 0; i < t.length; i++)
                        t[i](e)
                }
            }
        }
        ,
        4349: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.JsonUtilities = void 0;
            const n = i(9762);
            (t.JsonUtilities || (t.JsonUtilities = {})).parseJsonOrNull = function(e, t, i, o) {
                if (!n.StringUtilities.isNullOrEmpty(e))
                    try {
                        return JSON.parse(e)
                    } catch (e) {
                        o && t && i && o.reportJsonParsingError(t, i)
                    }
                return null
            }
        }
        ,
        3387: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ScreenCoordinateUtilities = void 0,
            (t.ScreenCoordinateUtilities || (t.ScreenCoordinateUtilities = {})).transformPointFromMainToCurrentFrame = function(e, t=self) {
                let i = {
                    x: e.x,
                    y: e.y
                };
                for (; t.frameElement && t !== top; ) {
                    i.x -= t.frameElement.getBoundingClientRect().left;
                    let e = parseInt(t.parent.getComputedStyle(t.frameElement).getPropertyValue("border-left-width"));
                    i.x -= e || 0,
                    i.y -= t.frameElement.getBoundingClientRect().top;
                    let n = parseInt(t.parent.getComputedStyle(t.frameElement).getPropertyValue("border-top-width"));
                    i.y -= n || 0,
                    t = t.parent
                }
                return i
            }
        }
        ,
        9762: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.StringUtilities = void 0,
            function(e) {
                e.NONEMPTY_STRING_REGEX = new RegExp("\\S");
                const t = /([.?*+^$[\]\\(){}|-])/g
                  , i = /\s*/g;
                function n(e) {
                    return e && e.length ? e.replace(t, "").replace(i, "") : ""
                }
                e.adjustTextByLength = function(e, t, i) {
                    var n = []
                      , o = "";
                    return e.forEach((e=>{
                        if (o.length + e.length <= t)
                            o += e;
                        else {
                            for (var s = function(e, t, i) {
                                for (var n = [], o = e, s = i; o.length > 0; ) {
                                    if (o.length > i) {
                                        s = i;
                                        for (var r = 0; r < t.length; r++) {
                                            var a = o.lastIndexOf(t[r], s - 1);
                                            if (a > 0) {
                                                s = a + 1;
                                                break
                                            }
                                        }
                                    } else
                                        s = o.length;
                                    n.push(o.substr(0, s)),
                                    o = o.substr(s)
                                }
                                return n
                            }(e, i, t), r = 0; r < s.length && o.length + s[r].length <= t; r++)
                                o += s[r],
                                s.shift();
                            o.length > 0 && (n.push(o),
                            o = ""),
                            s.forEach((e=>{
                                n.push(e)
                            }
                            ))
                        }
                    }
                    )),
                    o.length > 0 && n.push(o),
                    n
                }
                ,
                e.skipStartText = function(e, t) {
                    for (var i = 0, n = 0; n < e.length && t >= e[n].length; n++)
                        i++,
                        t -= e[n].length;
                    return i > 0 && e.splice(0, i),
                    e.length > 0 && t > 0 && (e[0] = e[0].substring(t)),
                    e
                }
                ,
                e.truncateEnd = function(e, t) {
                    let i = 0;
                    for (; i < e.length && t >= e[i].length; i++)
                        t -= e[i].length;
                    return i < e.length && (t > 0 && (e[i] = e[i].substring(0, t),
                    i++),
                    e.splice(i)),
                    e
                }
                ,
                e.isNullOrEmpty = function(e) {
                    return null == e || 0 === e.length
                }
                ,
                e.replaceLinebreaksWithSpaces = function(e) {
                    return e.replace(/[\r\n]/g, " ")
                }
                ,
                e.removeLineBreaksAndWhiteSpaces = function(e) {
                    return e.replace(/(\r\n|\n|\r|\s+)/gm, "")
                }
                ,
                e.createRegex = function(e) {
                    return e = n(e),
                    new RegExp("(" + e + ")","ig")
                }
                ,
                e.replaceSpaceAndSpecialChar = n,
                e.ExactMatchWithoutSpaceAndSpecialChar = function(e, t) {
                    return n(e) === n(t)
                }
            }(t.StringUtilities || (t.StringUtilities = {}))
        }
        ,
        4912: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.FeatureList = void 0;
            class i {
                static create(e) {
                    i._singletonObj = new i(e)
                }
                static get() {
                    return i._singletonObj
                }
                constructor(e) {
                    this._features = e
                }
                readAloudDefaultVoice() {
                    return Number(this._features.readAloudDefaultVoice)
                }
                hasReadAloudDefaultVoiceChanged() {
                    return Boolean(this._features.readAloudDefaultVoiceChanged)
                }
                isMSNArticleAndSmartReadAloudEnabled() {
                    return Boolean(this._features.isMsnArticleAndSmartReadAloudEnabled)
                }
                isReadAloudSDExtractionEnabled() {
                    return Boolean(this._features.readAloudSDExtractionEnabled)
                }
                isPreloadOnStartUtteranceEnabled() {
                    return Boolean(this._features.readAloudPreloadOnStartUtterance)
                }
                isSmartReadExperienceChangesEnabled() {
                    return Boolean(this._features.smartReadExperienceChangesEnabled)
                }
            }
            t.FeatureList = i
        }
        ,
        5209: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.Highlighter = void 0;
            const n = i(3755);
            !function(e) {
                const t = ["mssyllable"];
                function i(e, t, i) {
                    let n = t.ownerDocument.createElement(e);
                    return i.forEach((e=>{
                        n.classList.add(e)
                    }
                    )),
                    n.appendChild(t.parentNode.replaceChild(n, t)),
                    n
                }
                function o(e, t) {
                    let i = e.textContent;
                    if (t < 0 || t > i.length)
                        throw new Error("Bad index for splitText");
                    let n = i.substr(0, t)
                      , o = i.substr(t)
                      , s = e.ownerDocument.createTextNode(n)
                      , r = e.ownerDocument.createTextNode(o);
                    return e.parentNode.insertBefore(s, e),
                    e.parentNode.insertBefore(r, e),
                    e.parentNode.removeChild(e),
                    {
                        firstPart: s,
                        secondPart: r
                    }
                }
                e.surroundTextByTag = function(e, s, r, a, d, l, u, c) {
                    let h = s.startContainer
                      , g = s.startOffset
                      , m = s.endContainer
                      , _ = s.endOffset
                      , p = h.nodeType === Node.TEXT_NODE ? h : h.childNodes.item(g)
                      , R = m.nodeType === Node.TEXT_NODE ? m : m.childNodes.item(_)
                      , S = [];
                    for (; p && ((p.nodeType === Node.TEXT_NODE || p.nodeType === Node.ELEMENT_NODE && t.indexOf(p.tagName.toLowerCase()) > -1) && S.push(p),
                    p !== R); )
                        p = n.ReadingNavigationUtils.getNextReadingNode(s.commonAncestorContainer, p);
                    let C = [];
                    c && C.push(h.ownerDocument.createElement(e));
                    for (let t = 0; t < S.length; t++) {
                        if (S[t].nodeType === Node.TEXT_NODE && S[t].textContent.length > 1) {
                            let e = S[t];
                            if (e === h && g > 0) {
                                let t = e === m && _ > 0
                                  , i = o(e, g);
                                if (a(e, [i.firstPart, i.secondPart]),
                                e = i.secondPart,
                                t) {
                                    let t = o(e, _ - g);
                                    a(e, [t.firstPart, t.secondPart]),
                                    e = t.firstPart
                                }
                            } else if (e === m) {
                                let t = o(e, _);
                                a(e, [t.firstPart, t.secondPart]),
                                e = t.firstPart
                            }
                            r(e) ? S[t] = e : S[t] = null
                        }
                        if (C && S[t])
                            if (c && 1 === C.length) {
                                let e = S[t].parentNode.replaceChild(C[0], S[t]);
                                C[0].appendChild(e)
                            } else {
                                let n = i(e, S[t], d);
                                C.push(n)
                            }
                    }
                    return l && C[0] && C[0].setAttribute("aria-label", l),
                    u && C[0] && u.forEach(((e,t)=>{
                        C[0].setAttribute(t, e)
                    }
                    )),
                    {
                        value: ()=>C,
                        release: ()=>{
                            for (let e = 0; e < C.length; e++) {
                                let t = C[e]
                                  , i = t.parentNode;
                                if (i) {
                                    for (; t.firstChild; ) {
                                        let e = t.firstChild;
                                        t.removeChild(e),
                                        i.insertBefore(e, t)
                                    }
                                    i.removeChild(t),
                                    i.normalize()
                                }
                            }
                            C = null
                        }
                    }
                }
            }(t.Highlighter || (t.Highlighter = {}))
        }
        ,
        562: (e,t)=>{
            var i, n;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ContentType = t.UserActionType = void 0,
            (n = t.UserActionType || (t.UserActionType = {}))[n.Selection = 0] = "Selection",
            n[n.Scrolling = 1] = "Scrolling",
            (i = t.ContentType || (t.ContentType = {}))[i.Web = 0] = "Web",
            i[i.ReadingView = 1] = "ReadingView",
            i[i.PDF = 2] = "PDF"
        }
        ,
        2554: (e,t)=>{
            var i, n, o, s;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.SmartReadStatus = t.ReadAloudStartStates = t.ReadAloudErrors = t.ReadAloudVoiceUsage = void 0,
            (s = t.ReadAloudVoiceUsage || (t.ReadAloudVoiceUsage = {}))[s.kOnlineVoice = 0] = "kOnlineVoice",
            s[s.kOfflineVoice = 1] = "kOfflineVoice",
            (o = t.ReadAloudErrors || (t.ReadAloudErrors = {}))[o.GlobalScriptError = 0] = "GlobalScriptError",
            o[o.ScriptInjectionFailure = 1] = "ScriptInjectionFailure",
            o[o.SpeechUtteranceCreationFailure = 2] = "SpeechUtteranceCreationFailure",
            o[o.NoLanguagePackageInstalled = 3] = "NoLanguagePackageInstalled",
            o[o.LanguagePackageNotFound = 4] = "LanguagePackageNotFound",
            o[o.ReadingNavigatorInitializeFailure = 5] = "ReadingNavigatorInitializeFailure",
            o[o.NoVoicesAvailable = 6] = "NoVoicesAvailable",
            o[o.JSONParsing_ReadOutLoudSpeechPreferences = 7] = "JSONParsing_ReadOutLoudSpeechPreferences",
            o[o.JSONParsing_ReadOutLoudSpeechPreferences_ScopeState = 8] = "JSONParsing_ReadOutLoudSpeechPreferences_ScopeState",
            o[o.JSONParsing_ReadOutLoudStartRequestedTime = 9] = "JSONParsing_ReadOutLoudStartRequestedTime",
            o[o.Timeout = 10] = "Timeout",
            o[o.SpeechUtteranceCreationFailureForOnlineVoice = 11] = "SpeechUtteranceCreationFailureForOnlineVoice",
            o[o.SpeechUtteranceCreationFailure_Network = 12] = "SpeechUtteranceCreationFailure_Network",
            o[o.SpeechUtteranceCreationFailure_SynthesisFailed = 13] = "SpeechUtteranceCreationFailure_SynthesisFailed",
            o[o.SpeechUtteranceCreationFailure_TextTooLong = 14] = "SpeechUtteranceCreationFailure_TextTooLong",
            o[o.SpeechUtteranceCreationFailure_OnStart = 15] = "SpeechUtteranceCreationFailure_OnStart",
            o[o.SpeechUtteranceCreationFailureForOnlineVoice_OnStart = 16] = "SpeechUtteranceCreationFailureForOnlineVoice_OnStart",
            o[o.SpeechUtteranceCreationFailure_Network_OnStart = 17] = "SpeechUtteranceCreationFailure_Network_OnStart",
            o[o.SpeechUtteranceCreationFailure_TextTooLong_OnStart = 18] = "SpeechUtteranceCreationFailure_TextTooLong_OnStart",
            o[o.SpeechUtteranceCreationFailure_SynthesisFailed_OnStart = 19] = "SpeechUtteranceCreationFailure_SynthesisFailed_OnStart",
            o[o.StartCommandTimeout = 20] = "StartCommandTimeout",
            o[o.NoOnlineVoicesAvailable = 21] = "NoOnlineVoicesAvailable",
            (n = t.ReadAloudStartStates || (t.ReadAloudStartStates = {}))[n.ReadAloud_StartRequested = 0] = "ReadAloud_StartRequested",
            n[n.ReadAloud_Initialization = 1] = "ReadAloud_Initialization",
            n[n.ReadAloud_Activation = 2] = "ReadAloud_Activation",
            n[n.ReadAloud_Pause = 3] = "ReadAloud_Pause",
            n[n.ReadAloud_Stop = 4] = "ReadAloud_Stop",
            n[n.ReadAloud_Playing = 5] = "ReadAloud_Playing",
            n[n.ReadAloud_ContentNotAvailable = 6] = "ReadAloud_ContentNotAvailable",
            n[n.ReadAloud_StartReadingIgnored = 7] = "ReadAloud_StartReadingIgnored",
            (i = t.SmartReadStatus || (t.SmartReadStatus = {}))[i.Start = 0] = "Start",
            i[i.ContentEmptyPaywalled = 1] = "ContentEmptyPaywalled",
            i[i.ContentEmptyNonPaywalled = 2] = "ContentEmptyNonPaywalled",
            i[i.ContentFetchTimedOut = 3] = "ContentFetchTimedOut",
            i[i.InvalidResponse = 4] = "InvalidResponse",
            i[i.ContentLow = 5] = "ContentLow",
            i[i.ContentNoMatch = 6] = "ContentNoMatch",
            i[i.UserInitiatedFallbackClick = 7] = "UserInitiatedFallbackClick",
            i[i.UserInitiatedFallbackContextMenu = 8] = "UserInitiatedFallbackContextMenu"
        }
        ,
        7674: (e,t)=>{
            var i;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolType = void 0,
            (i = t.LearningToolType || (t.LearningToolType = {}))[i.Syllables = 1] = "Syllables",
            i[i.PartsOfSpeech = 2] = "PartsOfSpeech",
            i[i.PictureDictionary = 3] = "PictureDictionary"
        }
        ,
        4577: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolsCore = void 0;
            const n = i(7687)
              , o = i(3820)
              , s = i(8355)
              , r = i(6899)
              , a = i(7127);
            t.LearningToolsCore = class {
                constructor(e) {
                    this._viewer = e || null,
                    this._rolEventHandlers = null,
                    this._learningToolSettingsStore = new n.LearningToolsSettingsStoreProxy,
                    this._learningToolsSettingsEventHandlers = null,
                    this._comprehensionToolsEventHandlers = null,
                    this._readingPreferencesEventHandlers = null,
                    this._viewer && this._viewer.applyLearningToolsStyles()
                }
                initializeReadOutLoud(e, t, i) {
                    this._rolEventHandlers = new s.ReadOutLoudEventHandlers(e,t,i)
                }
                initializeLearningTools(e, t) {
                    this._learningToolsSettingsEventHandlers = new o.LearningToolsSettingsEventHandlers(this._learningToolSettingsStore,e),
                    this._comprehensionToolsEventHandlers = new r.ComprehensionToolsEventHandlers(e,t),
                    this._readingPreferencesEventHandlers = new a.ReadingPreferencesEventHandlers(e,t)
                }
                initializeLearningToolsModels() {
                    this._readingPreferencesEventHandlers.ensureInitialize(),
                    this._comprehensionToolsEventHandlers.ensureInitialize()
                }
                getComprehensionToolsSettingsStore() {
                    return this._learningToolSettingsStore
                }
            }
        }
        ,
        8157: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolsRuntime = void 0;
            const n = i(864)
              , o = i(429)
              , s = i(4912);
            t.LearningToolsRuntime = class {
                constructor() {
                    this._messageFromHost = new n.EventSource
                }
                onMessageFromHost() {
                    return this._messageFromHost
                }
                postMessageToHost(e, t) {
                    let i = t.length;
                    "Telemetry" === e && i > 0 && "Renderer" === t[0] ? (o.TelemetryLogger.logTelemetry(t),
                    i > 2 && ("ReadOutLoud_LogDwellTime" === t[2] || "ReadOutLoud_LogCharacterCount" === t[2]) && this.sendMessageToHost(e, t)) : this.sendMessageToHost(e, t)
                }
                detectTextLanguage(e) {
                    let t = "und";
                    return learningToolsNativeHandler && learningToolsNativeHandler.detectTextLanguage && (t = learningToolsNativeHandler.detectTextLanguage(e)),
                    t
                }
                initializePDFReader() {
                    learningToolsNativeHandler && learningToolsNativeHandler.initializePDFReader && learningToolsNativeHandler.initializePDFReader()
                }
                raiseMessageFromHost(e) {
                    this._messageFromHost.trigger(e)
                }
                initialize(e) {
                    if (e[2].length > 0) {
                        let t = JSON.parse(e[2]);
                        s.FeatureList.create(t)
                    }
                }
                sendMessageToHost(e, t) {
                    learningToolsNativeHandler && ("Telemetry" === e && t.shift(),
                    learningToolsNativeHandler.sendMessageToHost(e, t))
                }
            }
        }
        ,
        3820: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolsSettingsEventHandlers = void 0;
            const n = i(7687);
            t.LearningToolsSettingsEventHandlers = class {
                constructor(e, t) {
                    this._learningToolsSettingsStore = e,
                    this._hostProxy = t,
                    this._hostProxy.initializeComprehensionToolsSettingsRequested().subscribe((e=>{
                        this._learningToolsSettingsStore.onInitializeGrammarToolsSettingsFromHost({
                            frameTreeNodeId: Number(e[1]),
                            processId: Number(e[2])
                        }, e[3])
                    }
                    )),
                    this._hostProxy.initializePictureDictionarySettingsRequested().subscribe((e=>{
                        this._learningToolsSettingsStore.onInitializePictureDictionarySettingsFromHost({
                            frameTreeNodeId: Number(e[1]),
                            processId: Number(e[2])
                        }, e[3])
                    }
                    )),
                    this._hostProxy.initializeLineFocusSettingsRequested().subscribe((e=>{
                        this._learningToolsSettingsStore.onInitializeLineFocusSettingsFromHost({
                            frameTreeNodeId: Number(e[1]),
                            processId: Number(e[2])
                        }, e[3])
                    }
                    )),
                    this._learningToolsSettingsStore.onSettingChanged().subscribe((e=>{
                        switch (e.name) {
                        case n.ComprehensionToolsPOSColors:
                            let t = JSON.parse(this._learningToolsSettingsStore.getComprehensionToolsSettings());
                            t[e.name] = e.value,
                            this._hostProxy.sendComprehensionToolsSettings(JSON.stringify(t));
                            break;
                        case n.ComprehensionToolsLineMarkersEnabled:
                            let i = JSON.parse(this._learningToolsSettingsStore.getComprehensionToolsSettings());
                            i[e.name] = e.value,
                            this._hostProxy.sendComprehensionToolsSettings(JSON.stringify(i));
                            break;
                        case n.LineFocusLineCount:
                            let o = JSON.parse(this._learningToolsSettingsStore.getLineCountSettings());
                            o[e.name] = e.value,
                            this._hostProxy.sendLineFocusSettings(JSON.stringify(o));
                            break;
                        case n.PictureDictionaryEnabled:
                        case n.PictureDictionaryFirstRunExperienceCompleted:
                            let s = JSON.parse(this._learningToolsSettingsStore.getPictureDictionarySettings());
                            s[e.name] = e.value,
                            this._hostProxy.sendPictureDictionarySettings(JSON.stringify(s))
                        }
                    }
                    )),
                    this._hostProxy.settingsUpdateRequested().subscribe((e=>{
                        this._learningToolsSettingsStore.onSettingsUpdateFromHost(e)
                    }
                    ))
                }
            }
        }
        ,
        7687: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolsSettingsStoreProxy = t.PictureDictionaryFirstRunExperienceCompleted = t.PictureDictionaryEnabled = t.LineFocusLineCount = t.ComprehensionToolsLineMarkersEnabled = t.ComprehensionToolsPOSColors = void 0;
            const n = i(864)
              , o = i(4349)
              , s = '{"ComprehensionTools_PartsOfSpeechColors":                                                [                                                    {"nounsColorIndex": 5,                                                    "verbsColorIndex": 4,                                                    "adjectivesColorIndex": 1,                                                    "adverbsColorIndex": 9}                                                ],                                                "ComprehensionTools_LineMarkersEnabled":false}';
            t.ComprehensionToolsPOSColors = "ComprehensionTools_PartsOfSpeechColors",
            t.ComprehensionToolsLineMarkersEnabled = "ComprehensionTools_LineMarkersEnabled",
            t.LineFocusLineCount = "LineFocus_LineCount",
            t.PictureDictionaryEnabled = "PictureDictionary_Enabled",
            t.PictureDictionaryFirstRunExperienceCompleted = "PictureDictionary_FirstRunExperienceCompleted",
            t.LearningToolsSettingsStoreProxy = class {
                constructor() {
                    this._onSettingChanged = new n.EventSource
                }
                get currentFrame() {
                    return this._currentFrame
                }
                getComprehensionToolsSettings() {
                    return JSON.stringify(this._comprehensionToolsSettings)
                }
                getPictureDictionarySettings() {
                    return JSON.stringify(this._pictureDictionarySettings)
                }
                getLineCountSettings() {
                    return JSON.stringify(this._lineFocusSettings)
                }
                onSettingChanged() {
                    return this._onSettingChanged
                }
                getSetting(e) {
                    let i;
                    switch (e) {
                    case t.ComprehensionToolsPOSColors:
                    case t.ComprehensionToolsLineMarkersEnabled:
                        i = this._comprehensionToolsSettings;
                        break;
                    case t.PictureDictionaryEnabled:
                    case t.PictureDictionaryFirstRunExperienceCompleted:
                        i = this._pictureDictionarySettings;
                        break;
                    case t.LineFocusLineCount:
                        i = this._lineFocusSettings
                    }
                    return i && i.hasOwnProperty(e) ? i[e] : null
                }
                setSetting(e, i) {
                    let n;
                    switch (e) {
                    case t.ComprehensionToolsPOSColors:
                    case t.ComprehensionToolsLineMarkersEnabled:
                        n = this._comprehensionToolsSettings;
                        break;
                    case t.PictureDictionaryEnabled:
                    case t.PictureDictionaryFirstRunExperienceCompleted:
                        n = this._pictureDictionarySettings;
                        break;
                    case t.LineFocusLineCount:
                        n = this._lineFocusSettings
                    }
                    n && n.hasOwnProperty(e) && (n[e] = i,
                    this._onSettingChanged.trigger({
                        name: e,
                        value: i
                    }))
                }
                onSettingsUpdateFromHost(e) {}
                onInitializeGrammarToolsSettingsFromHost(e, i) {
                    if (this._currentFrame = e,
                    this._comprehensionToolsSettings = o.JsonUtilities.parseJsonOrNull(i, "ComprehensionTools", "InitialSettings"),
                    this._comprehensionToolsSettings)
                        if (this._comprehensionToolsSettings.hasOwnProperty(t.ComprehensionToolsLineMarkersEnabled) && this._comprehensionToolsSettings.hasOwnProperty(t.ComprehensionToolsPOSColors)) {
                            let e = this._comprehensionToolsSettings[t.ComprehensionToolsPOSColors];
                            if (e && (!e.hasOwnProperty("verbsColorIndex") || !e.hasOwnProperty("nounsColorIndex") || !e.hasOwnProperty("adverbsColorIndex") || !e.hasOwnProperty("adverbsColorIndex")))
                                return void o.JsonUtilities.parseJsonOrNull(s, "ComprehensionTools", "InitialSettings")
                        } else
                            this._comprehensionToolsSettings = o.JsonUtilities.parseJsonOrNull(s, "ComprehensionTools", "InitialSettings");
                    else
                        this._comprehensionToolsSettings = o.JsonUtilities.parseJsonOrNull(s, "ComprehensionTools", "InitialSettings")
                }
                onInitializePictureDictionarySettingsFromHost(e, i) {
                    this._currentFrame = e,
                    this._pictureDictionarySettings = o.JsonUtilities.parseJsonOrNull(i, "PictureDictionary", "InitialSettings"),
                    this._pictureDictionarySettings && (!this._pictureDictionarySettings || this._pictureDictionarySettings.hasOwnProperty(t.PictureDictionaryEnabled) && this._pictureDictionarySettings.hasOwnProperty(t.PictureDictionaryFirstRunExperienceCompleted)) || (this._pictureDictionarySettings = o.JsonUtilities.parseJsonOrNull('{"PictureDictionary_Enabled":false,                                                    "PictureDictionary_FirstRunExperienceCompleted":false}', "PictureDictionary", "InitialSettings"))
                }
                onInitializeLineFocusSettingsFromHost(e, i) {
                    this._currentFrame = e,
                    this._lineFocusSettings = o.JsonUtilities.parseJsonOrNull(i, "LineFocus", "InitialSettings"),
                    (!this._lineFocusSettings || this._lineFocusSettings && !this._lineFocusSettings.hasOwnProperty(t.LineFocusLineCount)) && (this._lineFocusSettings = o.JsonUtilities.parseJsonOrNull('{"LineFocus_LineCount":1}', "LineFocus", "InitialSettings"))
                }
            }
        }
        ,
        933: (e,t)=>{
            var i, n, o, s;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LineFocusLineCountType = t.HttpResponseCodeOperationResultMap = t.LinguisticModelOperationResult = t.ReadAloudPdfErrors = t.LearningToolsHistogramNames = void 0,
            (s = t.LearningToolsHistogramNames || (t.LearningToolsHistogramNames = {}))[s.ComprehensionToolsSyllabifyResultHistogram = 0] = "ComprehensionToolsSyllabifyResultHistogram",
            s[s.ComprehensionToolsPartsOfSpeechResultHistogram = 1] = "ComprehensionToolsPartsOfSpeechResultHistogram",
            s[s.ComprehensionToolsPaneInitializationResultHistogram = 2] = "ComprehensionToolsPaneInitializationResultHistogram",
            s[s.ComprehensionToolsSyllabifyTimeTakenForCompletionHistogram = 3] = "ComprehensionToolsSyllabifyTimeTakenForCompletionHistogram",
            s[s.ComprehensionToolsPartsOfSpeechTimeTakenForCompletionHistogram = 4] = "ComprehensionToolsPartsOfSpeechTimeTakenForCompletionHistogram",
            s[s.ComprehensionToolsPaneInitializationTimeTakenForCompletionHistogram = 5] = "ComprehensionToolsPaneInitializationTimeTakenForCompletionHistogram",
            s[s.ComprehensionToolsServiceRequestProcessingTimeForSyllablesHistogram = 6] = "ComprehensionToolsServiceRequestProcessingTimeForSyllablesHistogram",
            s[s.ComprehensionToolsServiceRequestProcessingTimeForPartsOfSpeechHistogram = 7] = "ComprehensionToolsServiceRequestProcessingTimeForPartsOfSpeechHistogram",
            s[s.ComprehensionToolsDwellTimeHistogram = 8] = "ComprehensionToolsDwellTimeHistogram",
            s[s.ReadAloudDwellTimeWeb = 9] = "ReadAloudDwellTimeWeb",
            s[s.ReadAloudDwellTimeReadingView = 10] = "ReadAloudDwellTimeReadingView",
            s[s.ReadAloudDwellTimePDF = 11] = "ReadAloudDwellTimePDF",
            s[s.ReadAloudVoiceUsageWeb = 12] = "ReadAloudVoiceUsageWeb",
            s[s.ReadAloudVoiceUsageReadingView = 13] = "ReadAloudVoiceUsageReadingView",
            s[s.ReadAloudVoiceUsagePDF = 14] = "ReadAloudVoiceUsagePDF",
            s[s.LineFocusStartStatus = 15] = "LineFocusStartStatus",
            s[s.LineFocusDwellTime = 16] = "LineFocusDwellTime",
            s[s.LineFocusTimeToStart = 17] = "LineFocusTimeToStart",
            s[s.LineFocusLineCount = 18] = "LineFocusLineCount",
            s[s.ReadAloudPdfPageCount = 19] = "ReadAloudPdfPageCount",
            s[s.ReadAloudPdfError = 20] = "ReadAloudPdfError",
            s[s.PictureDictionaryResultHistogram = 21] = "PictureDictionaryResultHistogram",
            s[s.ReadAloudPdfStartTimeToPageRatio = 22] = "ReadAloudPdfStartTimeToPageRatio",
            s[s.PictureDictionaryServiceRequestProcessingTimeHistogram = 23] = "PictureDictionaryServiceRequestProcessingTimeHistogram",
            s[s.PictureDictionaryPopupLaunchCount = 24] = "PictureDictionaryPopupLaunchCount",
            s[s.PictureDictionaryTimeTakenForPopupCreation = 25] = "PictureDictionaryTimeTakenForPopupCreation",
            s[s.PictureDictionaryWordsWithPicturesPercentage = 26] = "PictureDictionaryWordsWithPicturesPercentage",
            s[s.PictureDictionaryPopupLaunchPercentage = 27] = "PictureDictionaryPopupLaunchPercentage",
            s[s.PictureDictionaryToggleState = 28] = "PictureDictionaryToggleState",
            s[s.ReadAloudPdfAxTreeLoadTime = 29] = "ReadAloudPdfAxTreeLoadTime",
            s[s.ReadingViewToolsUsed = 30] = "ReadingViewToolsUsed",
            s[s.ReadingViewSelectionToolsUsed = 31] = "ReadingViewSelectionToolsUsed",
            s[s.ReadAloudOnlineCharacterCountWeb = 32] = "ReadAloudOnlineCharacterCountWeb",
            s[s.ReadAloudOnlineCharacterCountReadingView = 33] = "ReadAloudOnlineCharacterCountReadingView",
            s[s.ReadAloudOnlineCharacterCountPDF = 34] = "ReadAloudOnlineCharacterCountPDF",
            s[s.ReadAloudOfflineCharacterCountWeb = 35] = "ReadAloudOfflineCharacterCountWeb",
            s[s.ReadAloudOfflineCharacterCountReadingView = 36] = "ReadAloudOfflineCharacterCountReadingView",
            s[s.ReadAloudOfflineCharacterCountPDF = 37] = "ReadAloudOfflineCharacterCountPDF",
            s[s.ReadAloudStartPageNumberWeb = 38] = "ReadAloudStartPageNumberWeb",
            s[s.ReadAloudStartPageNumberReadingView = 39] = "ReadAloudStartPageNumberReadingView",
            s[s.ReadAloudStartPageNumberPDF = 40] = "ReadAloudStartPageNumberPDF",
            s[s.ReadAloudVoiceChangeCountWeb = 41] = "ReadAloudVoiceChangeCountWeb",
            s[s.ReadAloudVoiceChangeCountReadingView = 42] = "ReadAloudVoiceChangeCountReadingView",
            s[s.ReadAloudVoiceChangeCountPDF = 43] = "ReadAloudVoiceChangeCountPDF",
            s[s.ReadAloudRateChangeCountWeb = 44] = "ReadAloudRateChangeCountWeb",
            s[s.ReadAloudRateChangeCountReadingView = 45] = "ReadAloudRateChangeCountReadingView",
            s[s.ReadAloudRateChangeCountPDF = 46] = "ReadAloudRateChangeCountPDF",
            s[s.ComprehensionToolsPartsOfSpeechUsed = 47] = "ComprehensionToolsPartsOfSpeechUsed",
            s[s.ComprehensionToolsSyllablesUsed = 48] = "ComprehensionToolsSyllablesUsed",
            s[s.PictureDictionaryUsed = 49] = "PictureDictionaryUsed",
            s[s.ReadAloudSpeechSynthesisInvoked = 50] = "ReadAloudSpeechSynthesisInvoked",
            s[s.ReadAloudContinueClickCountWeb = 51] = "ReadAloudContinueClickCountWeb",
            s[s.ReadAloudSmartReadStatus = 52] = "ReadAloudSmartReadStatus",
            s[s.ReadAloudSmartReadContentMatch = 53] = "ReadAloudSmartReadContentMatch",
            (o = t.ReadAloudPdfErrors || (t.ReadAloudPdfErrors = {}))[o.None = 0] = "None",
            o[o.AccessibilityTreeLoadTimeout = 1] = "AccessibilityTreeLoadTimeout",
            o[o.AccessibilityTreeUpdateTimeout = 2] = "AccessibilityTreeUpdateTimeout",
            o[o.MojoPipeBindingBrowserToRendererFailed = 3] = "MojoPipeBindingBrowserToRendererFailed",
            o[o.AccessibilityTreeHelperCreationFailed = 4] = "AccessibilityTreeHelperCreationFailed",
            o[o.AccessibilityTreeSerializationFailed = 5] = "AccessibilityTreeSerializationFailed",
            o[o.InitialParamsJSONFailure = 6] = "InitialParamsJSONFailure",
            o[o.kMaxValue = 6] = "kMaxValue",
            function(e) {
                e[e.Success = 0] = "Success",
                e[e.TimedOut = 1] = "TimedOut",
                e[e.ProcessLinguisticModelRequestFailed = 2] = "ProcessLinguisticModelRequestFailed",
                e[e.BuildLiguisticModelRequestContentFailed = 3] = "BuildLiguisticModelRequestContentFailed",
                e[e.CreateLinguisticModelResourceRequestFailed = 4] = "CreateLinguisticModelResourceRequestFailed",
                e[e.RequestFailedInternetDisconnected = 5] = "RequestFailedInternetDisconnected",
                e[e.HttpResponseBadRequest = 6] = "HttpResponseBadRequest",
                e[e.HttpResponseUnAuthorized = 7] = "HttpResponseUnAuthorized",
                e[e.HttpResponseForbidden = 8] = "HttpResponseForbidden",
                e[e.HttpResponseNotFound = 9] = "HttpResponseNotFound",
                e[e.HttpResponseMethodNotAllowed = 10] = "HttpResponseMethodNotAllowed",
                e[e.HttpResponseRequestTimeout = 11] = "HttpResponseRequestTimeout",
                e[e.HttpResponseConflict = 12] = "HttpResponseConflict",
                e[e.HttpResponseGone = 13] = "HttpResponseGone",
                e[e.HttpResponsePreconditionFailed = 14] = "HttpResponsePreconditionFailed",
                e[e.HttpResponseCancelled = 15] = "HttpResponseCancelled",
                e[e.HttpResponseRequestEntityTooLarge = 16] = "HttpResponseRequestEntityTooLarge",
                e[e.HttpResponseTooManyRequests = 17] = "HttpResponseTooManyRequests",
                e[e.HttpResponseInternalServerError = 18] = "HttpResponseInternalServerError",
                e[e.HttpResponseServiceUnavailable = 19] = "HttpResponseServiceUnavailable",
                e[e.HttpResponseVersionNotSupported = 20] = "HttpResponseVersionNotSupported",
                e[e.HttpResponseNotImplemented = 21] = "HttpResponseNotImplemented",
                e[e.HttpResponseUnknown = 22] = "HttpResponseUnknown",
                e[e.BuildLiguisticModelResponseFailed = 23] = "BuildLiguisticModelResponseFailed",
                e[e.LinguisticModelResourceRequestTimedOut = 24] = "LinguisticModelResourceRequestTimedOut",
                e[e.kMaxValue = 24] = "kMaxValue"
            }(i = t.LinguisticModelOperationResult || (t.LinguisticModelOperationResult = {})),
            t.HttpResponseCodeOperationResultMap = new Map([[0, i.HttpResponseUnknown], [2, i.ProcessLinguisticModelRequestFailed], [3, i.BuildLiguisticModelRequestContentFailed], [4, i.CreateLinguisticModelResourceRequestFailed], [5, i.RequestFailedInternetDisconnected], [23, i.BuildLiguisticModelResponseFailed], [24, i.LinguisticModelResourceRequestTimedOut], [400, i.HttpResponseBadRequest], [401, i.HttpResponseUnAuthorized], [403, i.HttpResponseForbidden], [404, i.HttpResponseNotFound], [405, i.HttpResponseMethodNotAllowed], [408, i.HttpResponseRequestTimeout], [409, i.HttpResponseConflict], [410, i.HttpResponseGone], [412, i.HttpResponsePreconditionFailed], [413, i.HttpResponseRequestEntityTooLarge], [429, i.HttpResponseTooManyRequests], [499, i.HttpResponseCancelled], [500, i.HttpResponseInternalServerError], [501, i.HttpResponseNotImplemented], [503, i.HttpResponseServiceUnavailable], [505, i.HttpResponseVersionNotSupported]]),
            (n = t.LineFocusLineCountType || (t.LineFocusLineCountType = {}))[n.OneLine = 0] = "OneLine",
            n[n.ThreeLines = 1] = "ThreeLines",
            n[n.FiveLines = 2] = "FiveLines",
            n[n.kMaxValue = 2] = "kMaxValue"
        }
        ,
        8773: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.TelemetryClient = void 0;
            const n = i(933)
              , o = i(38)
              , s = i(7674)
              , r = i(2554)
              , a = i(562)
              , d = i(1094);
            t.TelemetryClient = class {
                constructor(e) {
                    this._hostProxy = e
                }
                reportJsonParsingError(e, t) {
                    this._hostProxy && "ReadOutLoud" === e && this._hostProxy.sendTelemetry("Browser", e, e + "_Error", r.ReadAloudErrors[t].toString())
                }
                reportLearningToolNLXRequestProcessTime(e, t, i) {
                    e !== s.LearningToolType.PartsOfSpeech && e !== s.LearningToolType.Syllables || !this._hostProxy ? e === s.LearningToolType.PictureDictionary && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_NLXRequestProcessTimeMessage", s.LearningToolType[e], t, i.toString()) : this._hostProxy.sendTelemetry("Renderer", "ComprehensionTools", "ComprehensionTools_NLXRequestProcessTimeMessage", s.LearningToolType[e], t, i.toString())
                }
                reportComprehensionToolsResultState(e, t, i) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ComprehensionTools", "ComprehensionTools_OperationResultState", o.ComprehensionToolType[e], n.LinguisticModelOperationResult[t], i.toString())
                }
                reportComprehensionToolsDwellTime(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ComprehensionTools", "ComprehensionTools_LogDwellTime", e.toString())
                }
                reportComprehensionToolsUsage(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry(d.RendererHost, d.ComprehensionToolsFeatureName, d.ComprehensionToolsLogUsage, o.ComprehensionToolType[e])
                }
                reportReadOutLoudDwellTime(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogDwellTime", a.ContentType[e].toString(), t.toString())
                }
                reportReadOutLoudSuccess(e, t, i) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Browser", "ReadOutLoud", "ReadOutLoud_Success", e, t.toString(), i.toString())
                }
                reportReadOutLoudVoiceUsage(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_VoiceUsage", a.ContentType[e].toString(), t.toString())
                }
                reportReadOutLoudInternalError(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Browser", "ReadOutLoud", "ReadOutLoud_Error", e.toString())
                }
                reportReadOutLoudStartStates(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Browser", "ReadOutLoud", "ReadOutLoud_StartStates", e.toString())
                }
                reportReadOutLoudPDFPageCount(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogPageCount", e.toString())
                }
                reportReadOutLoudStartPageNumber(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogStartPageNumber", a.ContentType[e].toString(), t.toString())
                }
                reportReadOutLoudPdfTimeToPageRatio(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogTimeToPageRatio", e.toString())
                }
                reportReadOutLoudPdfError(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoudPdf_Error", e.valueOf().toString())
                }
                reportReadOutLoudCharacterCount(e, t, i) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogCharacterCount", t.toString(), a.ContentType[e].toString(), i.toString())
                }
                reportNoPII(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetryErrorMeasureNoPII(e, t)
                }
                reportLineFocusStartStatus(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "LineFocus", "LineFocus_StartStatus", e.toString())
                }
                reportLineFocusDwellTime(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "LineFocus", "LineFocus_DwellTime", e.toString())
                }
                reportLineFocusTimeToStart(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "LineFocus", "LineFocus_TimeToStart", e.toString())
                }
                reportLineFocusLineCount(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "LineFocus", "LineFocus_LineCount", e.toString())
                }
                reportPictureDictionaryResultState(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_OperationResultState", n.LinguisticModelOperationResult[e], t.toString())
                }
                reportPictureDictionaryPopupLaunchCount(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_PopupLaunchCount", e.toString())
                }
                reportPictureDictionaryTimeTakenForPopupCreation(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_TimeTakenForPopupCreation", e.toString())
                }
                reportPictureDictionaryWordsWithPicturesPercentage(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_WordsWithPicturesPercentage", e.toString())
                }
                reportPictureDictionaryPopupLaunchPercentage(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_PopupLaunchPercentage", e.toString())
                }
                reportPictureDictionaryToggleState(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "PictureDictionary", "PictureDictionary_ToggleState", e.toString())
                }
                reportPictureDictionaryUsage() {
                    this._hostProxy && this._hostProxy.sendTelemetry(d.RendererHost, d.PictureDictionaryFeatureName, d.PictureDictionaryLogUsage)
                }
                reportReadOutLoudVoiceChange(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_NoOfTimesVoiceChanged", a.ContentType[e].toString(), t.toString())
                }
                reportReadOutLoudRateChange(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_NoOfTimesRateChanged", a.ContentType[e].toString(), t.toString())
                }
                reportReadOutLoudSpeechSynthesisInvoke(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_NoOfTimesSpeechSynthesisInvoked", e.toString())
                }
                reportReadOutLoudContinueClickCount(e, t) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_LogContinueClickCount", t.toString(), a.ContentType[e].toString())
                }
                reportReadOutLoudSmartReadStatus(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_SmartReadStatus", e.toString())
                }
                reportReadOutLoudSmartReadContentMatch(e) {
                    this._hostProxy && this._hostProxy.sendTelemetry("Renderer", "ReadOutLoud", "ReadOutLoud_SmartReadContentMatch", e.toString())
                }
            }
        }
        ,
        1094: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.PictureDictionaryLogUsage = t.PictureDictionaryFeatureName = t.ComprehensionToolsLogUsage = t.ComprehensionToolsFeatureName = t.RendererHost = void 0,
            t.RendererHost = "Renderer",
            t.ComprehensionToolsFeatureName = "ComprehensionTools",
            t.ComprehensionToolsLogUsage = "ComprehensonTools_LogUsage",
            t.PictureDictionaryFeatureName = "PictureDictionary",
            t.PictureDictionaryLogUsage = "PictureDictionary_LogUsage"
        }
        ,
        429: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.TelemetryLogger = void 0;
            const n = i(933)
              , o = i(38)
              , s = i(2554)
              , r = i(7674)
              , a = i(1094);
            class d {
                static logTelemetry(e) {
                    switch (e[1]) {
                    case "ReadOutLoud":
                        d.handleReadAloudTelemetryMessage(e);
                        break;
                    case "ComprehensionTools":
                        d.handleComprehensionToolsTelemetryMessage(e);
                        break;
                    case "LineFocus":
                        d.handleLineFocusTelemetryMessage(e);
                        break;
                    case "PictureDictionary":
                        d.handlePictureDictionaryTelemetryMessage(e);
                        break;
                    default:
                        return
                    }
                }
                static handleLineFocusTelemetryMessage(e) {
                    e.length < 4 || ("LineFocus_StartStatus" === e[2] ? d.logLineFocusStartStatus("true" === e[3]) : "LineFocus_TimeToStart" === e[2] ? d.logLineFocusTimeToStart(Number(e[3])) : "LineFocus_DwellTime" === e[2] ? d.logLineFocusDwellTime(Number(e[3])) : "LineFocus_LineCount" === e[2] && d.logLineFocusLineCount(Number(e[3])))
                }
                static handleComprehensionToolsTelemetryMessage(e) {
                    e.length >= 6 && "ComprehensionTools_OperationResultState" === e[2] ? d.logComprehensionToolOperationResult(e[3], n.LinguisticModelOperationResult[e[4]], Number(e[5])) : e.length >= 6 && "ComprehensionTools_NLXRequestProcessTimeMessage" === e[2] ? d.logNLXRequestProcessTime(e[3], e[4], Number(e[5])) : e.length >= 4 && "ComprehensionTools_LogDwellTime" === e[2] ? d.logComprehensionToolsDwellTime(Number(e[3])) : e.length >= 4 && e[2] === a.ComprehensionToolsLogUsage && d.logComprehensionToolsUsage(e[3])
                }
                static handleReadAloudTelemetryMessage(e) {
                    "ReadOutLoud_LogDwellTime" === e[2] ? d.logReadAloudDwellTime(e[3], Number(e[4])) : "ReadOutLoud_VoiceUsage" === e[2] ? d.logReadAloudVoiceUsage(e[3], "true" === e[4]) : "ReadOutLoud_LogPageCount" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudPdfPageCount(Number(e[3])) : "ReadOutLoud_LogTimeToPageRatio" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudPdfPageToTimeRatio(Number(e[3])) : "ReadOutLoudPdf_Error" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudPdfError(Number(e[3])) : "ReadOutLoud_LogCharacterCount" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudCharacterCount(Number(e[3]), e[4], "true" === e[5]) : "ReadOutLoud_LogStartPageNumber" === e[2] ? isNaN(Number(e[4])) || d.logReadAloudStartPageNumber(e[3], Number(e[4])) : "ReadOutLoud_NoOfTimesVoiceChanged" === e[2] ? isNaN(Number(e[4])) || d.logReadAloudNoOfTimeVoiceChanged(e[3], Number(e[4])) : "ReadOutLoud_NoOfTimesRateChanged" === e[2] ? isNaN(Number(e[4])) || d.logReadAloudNoOfTimesRateChanged(e[3], Number(e[4])) : "ReadOutLoud_NoOfTimesSpeechSynthesisInvoked" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudNoOfTimesSpeechSynthesisInvoked(Number(e[3])) : "ReadOutLoud_LogContinueClickCount" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudContinueClickCountWebAfterROLStarted(Number(e[3]), e[4]) : "ReadOutLoud_SmartReadStatus" === e[2] ? isNaN(Number(e[3])) || d.logReadAloudSmartReadStatus(Number(e[3])) : "ReadOutLoud_SmartReadContentMatch" === e[2] && (isNaN(Number(e[3])) || d.logReadAloudSmartReadContentMatch(Number(e[3])))
                }
                static handlePictureDictionaryTelemetryMessage(e) {
                    "PictureDictionary_ToggleState" === e[2] && 4 === e.length ? d.logPictureDictionaryToggleState("true" === e[3]) : "PictureDictionary_OperationResultState" === e[2] && 5 === e.length ? d.logPictureDictionaryOperationResult(n.LinguisticModelOperationResult[e[3]], Number(e[4])) : "PictureDictionary_NLXRequestProcessTimeMessage" !== e[2] || 6 !== e.length || isNaN(Number(e[5])) ? "PictureDictionary_PopupLaunchCount" !== e[2] || 4 !== e.length || isNaN(Number(e[3])) ? "PictureDictionary_TimeTakenForPopupCreation" !== e[2] || 4 !== e.length || isNaN(Number(e[3])) ? "PictureDictionary_WordsWithPicturesPercentage" !== e[2] || 4 !== e.length || isNaN(Number(e[3])) ? "PictureDictionary_PopupLaunchPercentage" !== e[2] || 4 !== e.length || isNaN(Number(e[3])) ? e[2] === a.PictureDictionaryLogUsage && d.logPictureDictionaryUsage() : d.logPictureDictionaryPopupLaunchPercentage(Number(e[3])) : d.logPictureDictionaryWordsWithPicturesPercentage(Number(e[3])) : d.logPictureDictionaryTimeTakenForPopupCreation(Number(e[3])) : d.logPictureDictionaryPopupLaunchCount(Number(e[3])) : d.logNLXRequestProcessTime(e[3], e[4], Number(e[5]))
                }
                static logComprehensionToolOperationResult(e, t, i) {
                    learningToolsNativeHandler && (e === o.ComprehensionToolType[o.ComprehensionToolType.syllables] ? (learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.ComprehensionToolsSyllabifyResultHistogram, t),
                    t === n.LinguisticModelOperationResult.Success && learningToolsNativeHandler.logUmaHistogramMediumTimes(n.LearningToolsHistogramNames.ComprehensionToolsSyllabifyTimeTakenForCompletionHistogram, i)) : e === o.ComprehensionToolType[o.ComprehensionToolType.pos] && (learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.ComprehensionToolsPartsOfSpeechResultHistogram, t),
                    t === n.LinguisticModelOperationResult.Success && learningToolsNativeHandler.logUmaHistogramMediumTimes(n.LearningToolsHistogramNames.ComprehensionToolsPartsOfSpeechTimeTakenForCompletionHistogram, i)))
                }
                static logComprehensionToolsDwellTime(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramLongTimes(n.LearningToolsHistogramNames.ComprehensionToolsDwellTimeHistogram, e)
                }
                static logComprehensionToolsUsage(e) {
                    if (learningToolsNativeHandler) {
                        let t;
                        switch (e) {
                        case o.ComprehensionToolType[o.ComprehensionToolType.pos]:
                            t = n.LearningToolsHistogramNames.ComprehensionToolsPartsOfSpeechUsed;
                            break;
                        case o.ComprehensionToolType[o.ComprehensionToolType.syllables]:
                            t = n.LearningToolsHistogramNames.ComprehensionToolsSyllablesUsed;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramExactLinear(t, 0, 1)
                    }
                }
                static logNLXRequestProcessTime(e, t, i) {
                    learningToolsNativeHandler && (e === r.LearningToolType[r.LearningToolType.Syllables] ? "Service" === t && learningToolsNativeHandler.logUmaHistogramCustomTimes(n.LearningToolsHistogramNames.ComprehensionToolsServiceRequestProcessingTimeForSyllablesHistogram, 1, 18e4, 50, i) : e === r.LearningToolType[r.LearningToolType.PartsOfSpeech] ? "Service" === t && learningToolsNativeHandler.logUmaHistogramCustomTimes(n.LearningToolsHistogramNames.ComprehensionToolsServiceRequestProcessingTimeForPartsOfSpeechHistogram, 1, 18e4, 50, i) : e === r.LearningToolType[r.LearningToolType.PictureDictionary] && "Service" === t && learningToolsNativeHandler.logUmaHistogramCustomTimes(n.LearningToolsHistogramNames.PictureDictionaryServiceRequestProcessingTimeHistogram, 1, 18e4, 50, i))
                }
                static logReadAloudDwellTime(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        switch (e) {
                        case "Web":
                            i = n.LearningToolsHistogramNames.ReadAloudDwellTimeWeb;
                            break;
                        case "ReadingView":
                            i = n.LearningToolsHistogramNames.ReadAloudDwellTimeReadingView;
                            break;
                        case "PDF":
                            i = n.LearningToolsHistogramNames.ReadAloudDwellTimePDF;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramCustomTimes(i, 1e3, 36e5, 50, t)
                    }
                }
                static logReadAloudVoiceUsage(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        switch (e) {
                        case "Web":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceUsageWeb;
                            break;
                        case "ReadingView":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceUsageReadingView;
                            break;
                        case "PDF":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceUsagePDF;
                            break;
                        default:
                            return
                        }
                        let o = t ? s.ReadAloudVoiceUsage.kOnlineVoice : s.ReadAloudVoiceUsage.kOfflineVoice;
                        learningToolsNativeHandler.logUmaHistogramEnumeration(i, o)
                    }
                }
                static logReadAloudPdfPageToTimeRatio(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramCustomCounts(n.LearningToolsHistogramNames.ReadAloudPdfStartTimeToPageRatio, 0, 18e4, 50, e)
                }
                static logReadAloudPdfPageCount(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramCustomCounts(n.LearningToolsHistogramNames.ReadAloudPdfPageCount, 0, 1e4, 20, e)
                }
                static logReadAloudCharacterCount(e, t, i) {
                    if (learningToolsNativeHandler) {
                        let o;
                        if (i)
                            switch (t) {
                            case "Web":
                                o = n.LearningToolsHistogramNames.ReadAloudOnlineCharacterCountWeb;
                                break;
                            case "ReadingView":
                                o = n.LearningToolsHistogramNames.ReadAloudOnlineCharacterCountReadingView;
                                break;
                            case "PDF":
                                o = n.LearningToolsHistogramNames.ReadAloudOnlineCharacterCountPDF;
                                break;
                            default:
                                return
                            }
                        else
                            switch (t) {
                            case "Web":
                                o = n.LearningToolsHistogramNames.ReadAloudOfflineCharacterCountWeb;
                                break;
                            case "ReadingView":
                                o = n.LearningToolsHistogramNames.ReadAloudOfflineCharacterCountReadingView;
                                break;
                            case "PDF":
                                o = n.LearningToolsHistogramNames.ReadAloudOfflineCharacterCountPDF;
                                break;
                            default:
                                return
                            }
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(o, 0, 1e6, 50, e)
                    }
                }
                static logReadAloudStartPageNumber(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        switch (e) {
                        case "Web":
                            i = n.LearningToolsHistogramNames.ReadAloudStartPageNumberWeb;
                            break;
                        case "ReadingView":
                            i = n.LearningToolsHistogramNames.ReadAloudStartPageNumberReadingView;
                            break;
                        case "PDF":
                            i = n.LearningToolsHistogramNames.ReadAloudStartPageNumberPDF;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(i, 1, 1e4, 40, t)
                    }
                }
                static logLineFocusStartStatus(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramBoolean(n.LearningToolsHistogramNames.LineFocusStartStatus, e)
                }
                static logLineFocusDwellTime(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramLongTimes(n.LearningToolsHistogramNames.LineFocusDwellTime, e)
                }
                static logLineFocusTimeToStart(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramTimes(n.LearningToolsHistogramNames.LineFocusTimeToStart, e)
                }
                static logLineFocusLineCount(e) {
                    if (learningToolsNativeHandler) {
                        let t;
                        switch (e) {
                        case 1:
                            t = n.LineFocusLineCountType.OneLine;
                            break;
                        case 3:
                            t = n.LineFocusLineCountType.ThreeLines;
                            break;
                        case 5:
                            t = n.LineFocusLineCountType.FiveLines;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.LineFocusLineCount, t)
                    }
                }
                static logReadAloudPdfError(e) {
                    learningToolsNativeHandler && e > n.ReadAloudPdfErrors.None && e <= n.ReadAloudPdfErrors.kMaxValue && learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.ReadAloudPdfError, e)
                }
                static logPictureDictionaryOperationResult(e, t) {
                    learningToolsNativeHandler && e <= n.LinguisticModelOperationResult.kMaxValue && learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.PictureDictionaryResultHistogram, e)
                }
                static logPictureDictionaryTimeTakenForPopupCreation(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramTimes(n.LearningToolsHistogramNames.PictureDictionaryTimeTakenForPopupCreation, e)
                }
                static logPictureDictionaryPopupLaunchCount(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramCustomCounts(n.LearningToolsHistogramNames.PictureDictionaryPopupLaunchCount, 0, 1e3, 50, e)
                }
                static logPictureDictionaryWordsWithPicturesPercentage(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramPercentage(n.LearningToolsHistogramNames.PictureDictionaryWordsWithPicturesPercentage, e)
                }
                static logPictureDictionaryPopupLaunchPercentage(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramCustomCounts(n.LearningToolsHistogramNames.PictureDictionaryPopupLaunchPercentage, 0, 1e3, 50, e)
                }
                static logPictureDictionaryToggleState(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramBoolean(n.LearningToolsHistogramNames.PictureDictionaryToggleState, e)
                }
                static logPictureDictionaryUsage() {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramExactLinear(n.LearningToolsHistogramNames.PictureDictionaryUsed, 0, 1)
                }
                static logReadAloudNoOfTimeVoiceChanged(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        switch (e) {
                        case "Web":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceChangeCountWeb;
                            break;
                        case "ReadingView":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceChangeCountReadingView;
                            break;
                        case "PDF":
                            i = n.LearningToolsHistogramNames.ReadAloudVoiceChangeCountPDF;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(i, 0, 100, 5, t)
                    }
                }
                static logReadAloudNoOfTimesRateChanged(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        switch (e) {
                        case "Web":
                            i = n.LearningToolsHistogramNames.ReadAloudRateChangeCountWeb;
                            break;
                        case "ReadingView":
                            i = n.LearningToolsHistogramNames.ReadAloudRateChangeCountReadingView;
                            break;
                        case "PDF":
                            i = n.LearningToolsHistogramNames.ReadAloudRateChangeCountPDF;
                            break;
                        default:
                            return
                        }
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(i, 0, 100, 5, t)
                    }
                }
                static logReadAloudNoOfTimesSpeechSynthesisInvoked(e) {
                    if (learningToolsNativeHandler) {
                        let t = n.LearningToolsHistogramNames.ReadAloudSpeechSynthesisInvoked;
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(t, 0, 1e3, 11, e)
                    }
                }
                static logReadAloudContinueClickCountWebAfterROLStarted(e, t) {
                    if (learningToolsNativeHandler) {
                        let i;
                        if ("Web" !== t)
                            return;
                        i = n.LearningToolsHistogramNames.ReadAloudContinueClickCountWeb,
                        learningToolsNativeHandler.logUmaHistogramCustomCounts(i, 0, 100, 5, e)
                    }
                }
                static logReadAloudSmartReadStatus(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramEnumeration(n.LearningToolsHistogramNames.ReadAloudSmartReadStatus, e)
                }
                static logReadAloudSmartReadContentMatch(e) {
                    learningToolsNativeHandler && learningToolsNativeHandler.logUmaHistogramPercentage(n.LearningToolsHistogramNames.ReadAloudSmartReadContentMatch, Math.round(e))
                }
            }
            t.TelemetryLogger = d
        }
        ,
        38: (e,t)=>{
            var i;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ComprehensionToolType = void 0,
            (i = t.ComprehensionToolType || (t.ComprehensionToolType = {}))[i.syllables = 1] = "syllables",
            i[i.nouns = 2] = "nouns",
            i[i.verbs = 4] = "verbs",
            i[i.adjectives = 8] = "adjectives",
            i[i.adverbs = 16] = "adverbs",
            i[i.pos = 30] = "pos"
        }
        ,
        6899: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ComprehensionToolsEventHandlers = void 0,
            t.ComprehensionToolsEventHandlers = class {
                constructor(e, t) {
                    this._releasables = [],
                    this._hostProxy = e,
                    this._mainViewModel = t,
                    this._comprehensionToolsViewModel = null,
                    this.registerHostEventHandlers(),
                    this._isInitialized = !1
                }
                reset() {
                    this._releasables.forEach((e=>{
                        e.release()
                    }
                    )),
                    this._releasables = [],
                    this._comprehensionToolsViewModel = null
                }
                ensureInitialize() {
                    if (!this._isInitialized && (this._mainViewModel.initializeLearningTools(),
                    this._comprehensionToolsViewModel = this._mainViewModel.getComprehensionToolsViewModel(),
                    this._comprehensionToolsViewModel)) {
                        let e = ()=>{
                            this._hostProxy.sendComprehensionToolsPaneStatus(this._comprehensionToolsViewModel.comprehensionToolsPaneStatus())
                        }
                        ;
                        this._releasables.push(this._comprehensionToolsViewModel.onComprehensionToolsStatusChanged().subscribe((()=>{
                            e()
                        }
                        ))),
                        this._releasables.push(this._comprehensionToolsViewModel.onProgressIndicatorVisibilityChanged().subscribe((e=>{
                            e || this._hostProxy.sendProgressIndicatorVisibility(e)
                        }
                        ))),
                        e()
                    }
                }
                registerHostEventHandlers() {
                    this._hostProxy.comprehensionToolsInitialPaneStatusRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._hostProxy.sendPartsOfSpeechColorsForThemes(this._comprehensionToolsViewModel.getPartsOfSpeechColorsForThemes())
                    }
                    )),
                    this._hostProxy.addSyllablesRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addSyllables()
                    }
                    )),
                    this._hostProxy.addNounsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addNounHighlight()
                    }
                    )),
                    this._hostProxy.addVerbsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addVerbHighlight()
                    }
                    )),
                    this._hostProxy.addAdverbsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addAdverbHighlight()
                    }
                    )),
                    this._hostProxy.addAdjectivesRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addAdjectiveHighlight()
                    }
                    )),
                    this._hostProxy.removeSyllablesRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeSyllables()
                    }
                    )),
                    this._hostProxy.removeNounsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeNounHighlight()
                    }
                    )),
                    this._hostProxy.removeVerbsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeVerbHighlight()
                    }
                    )),
                    this._hostProxy.removeAdjectivesRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeAdjectiveHighlight()
                    }
                    )),
                    this._hostProxy.removeAdverbsRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeAdverbHighlight()
                    }
                    )),
                    this._hostProxy.setNounsColorRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.setNounsColor(e)
                    }
                    )),
                    this._hostProxy.setVerbsColorRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.setVerbsColor(e)
                    }
                    )),
                    this._hostProxy.setAdjectivesColorRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.setAdjectivesColor(e)
                    }
                    )),
                    this._hostProxy.setAdverbsColorRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.setAdverbsColor(e)
                    }
                    )),
                    this._hostProxy.addLineMarkers().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.addLineMarkers()
                    }
                    )),
                    this._hostProxy.removeLineMarkers().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.removeLineMarkers()
                    }
                    )),
                    this._hostProxy.languageChangeRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.onLanguageChangeRequested()
                    }
                    )),
                    this._hostProxy.languageChangeRequestCompleted().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.onLanguageChangeRequestCompleted()
                    }
                    )),
                    this._hostProxy.onContentShifted().subscribe((()=>{
                        this.ensureInitialize(),
                        this._comprehensionToolsViewModel.onContentShifted()
                    }
                    ))
                }
            }
        }
        ,
        6678: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.Section = t.Match = void 0,
            t.Match = class {
                constructor(e) {
                    this._sections = [],
                    e && (this._sections = e)
                }
                set sections(e) {
                    this._sections = e
                }
                get sections() {
                    return this._sections
                }
                get nodes() {
                    let e = [];
                    return this._sections.forEach((t=>{
                        e.push(t.node)
                    }
                    )),
                    e
                }
            }
            ,
            t.Section = class {
                constructor(e, t, i) {
                    this.begin = e,
                    this.end = t,
                    this.node = i
                }
            }
        }
        ,
        5309: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.IGNORE_NODE_NAMES = void 0,
            t.IGNORE_NODE_NAMES = new Set(["SCRIPT", "STYLE", "EMBED", "OBJECT", "SELECT", "TEXTAREA", "IFRAME", "NOSCRIPT"])
        }
        ,
        5305: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.FindInPage = void 0;
            const n = i(9762)
              , o = i(5309)
              , s = i(6678);
            !function(e) {
                let t = ""
                  , i = []
                  , r = 0;
                function a() {
                    t = "",
                    i = [],
                    r = 0
                }
                function d(e) {
                    let t = 0
                      , n = i.length;
                    for (; t < n; ) {
                        let o = Math.floor((t + n) / 2);
                        const s = i[o];
                        if (s && s.begin <= e && e < s.end)
                            return o;
                        s && s.end <= e ? t = o + 1 : n = o
                    }
                    return t
                }
                e.findString = function(e, l, u=!1) {
                    if (u && a(),
                    !e)
                        return;
                    let c = n.StringUtilities.createRegex(e);
                    return c.lastIndex = r,
                    function(e, a) {
                        let l;
                        if (0 === t.length && function(e) {
                            let r = [document.body];
                            for (; r.length; ) {
                                let a = r.pop()
                                  , d = a.childNodes;
                                if (d && d.length)
                                    for (let t = d.length - 1; t >= 0; --t) {
                                        let i = d[t];
                                        i.nodeType != Node.ELEMENT_NODE && i.nodeType != Node.TEXT_NODE || o.IGNORE_NODE_NAMES.has(i.nodeName) || !e(a) || r.push(i)
                                    }
                                if (a.nodeType == Node.TEXT_NODE && a.parentNode) {
                                    const e = n.StringUtilities.replaceSpaceAndSpecialChar(a.textContent);
                                    i.push(new s.Section(t.length,t.length + e.length,a)),
                                    t += e
                                }
                            }
                        }(a),
                        e) {
                            let n = e.exec(t);
                            if (n) {
                                let e = n.index
                                  , t = e + n[0].length - 1
                                  , o = d(e)
                                  , r = d(t);
                                l = new s.Match,
                                l.sections = i.slice(o, r + 1)
                            }
                            r = e.lastIndex
                        }
                        return l
                    }(c, l)
                }
                ,
                e.reset = a
            }(t.FindInPage || (t.FindInPage = {}))
        }
        ,
        4560: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.LearningToolsHostProxy = void 0;
            const n = i(864)
              , o = i(9351)
              , s = i(6609);
            class r extends o.HostProxy {
                constructor(e) {
                    super(e),
                    this._initializeComprehensionToolsSettingsRequested = new n.EventSource,
                    this._initializeLineFocusSettingsRequested = new n.EventSource,
                    this._initializePictureDictionarySettingsRequested = new n.EventSource,
                    this._comprehensionToolsInitialPaneStatusRequested = new n.EventSource,
                    this._readingPreferencesInitialPaneStatusRequested = new n.EventSource,
                    this._settingsUpdateRequested = new n.EventSource,
                    this._addSyllablesRequested = new n.EventSource,
                    this._onContentShifted = new n.EventSource,
                    this._addNounsRequested = new n.EventSource,
                    this._addVerbsRequested = new n.EventSource,
                    this._addAdjectivesRequested = new n.EventSource,
                    this._addAdverbsRequested = new n.EventSource,
                    this._removeSyllablesRequested = new n.EventSource,
                    this._removeNounsRequested = new n.EventSource,
                    this._removeVerbsRequested = new n.EventSource,
                    this._removeAdjectivesRequested = new n.EventSource,
                    this._removeAdverbsRequested = new n.EventSource,
                    this._setNounsColorRequested = new n.EventSource,
                    this._setVerbsColorRequested = new n.EventSource,
                    this._setAdjectivesColorRequested = new n.EventSource,
                    this._setAdverbsColorRequested = new n.EventSource,
                    this._nlxResponseReceived = new n.EventSource,
                    this._addLineMarkersRequested = new n.EventSource,
                    this._removeLineMarkersRequested = new n.EventSource,
                    this._enableLineFocusRequested = new n.EventSource,
                    this._disableLineFocusRequested = new n.EventSource,
                    this._setNumberOfLinesInFocusRequested = new n.EventSource,
                    this._upButtonClicked = new n.EventSource,
                    this._downButtonClicked = new n.EventSource,
                    this._enablePictureDictionaryRequested = new n.EventSource,
                    this._disablePictureDictionaryRequested = new n.EventSource,
                    this._hidePictureDictionaryPopupRequested = new n.EventSource,
                    this._pictureDictionaryPopupHidden = new n.EventSource,
                    this._languageChangeRequested = new n.EventSource,
                    this._languageChangeRequestCompleted = new n.EventSource
                }
                initializeComprehensionToolsSettingsRequested() {
                    return this._initializeComprehensionToolsSettingsRequested
                }
                initializePictureDictionarySettingsRequested() {
                    return this._initializePictureDictionarySettingsRequested
                }
                initializeLineFocusSettingsRequested() {
                    return this._initializeLineFocusSettingsRequested
                }
                comprehensionToolsInitialPaneStatusRequested() {
                    return this._comprehensionToolsInitialPaneStatusRequested
                }
                readingPreferencesInitialPaneStatusRequested() {
                    return this._readingPreferencesInitialPaneStatusRequested
                }
                settingsUpdateRequested() {
                    return this._settingsUpdateRequested
                }
                addSyllablesRequested() {
                    return this._addSyllablesRequested
                }
                addNounsRequested() {
                    return this._addNounsRequested
                }
                addVerbsRequested() {
                    return this._addVerbsRequested
                }
                addAdjectivesRequested() {
                    return this._addAdjectivesRequested
                }
                addAdverbsRequested() {
                    return this._addAdverbsRequested
                }
                removeSyllablesRequested() {
                    return this._removeSyllablesRequested
                }
                removeNounsRequested() {
                    return this._removeNounsRequested
                }
                removeVerbsRequested() {
                    return this._removeVerbsRequested
                }
                removeAdjectivesRequested() {
                    return this._removeAdjectivesRequested
                }
                removeAdverbsRequested() {
                    return this._removeAdverbsRequested
                }
                setNounsColorRequested() {
                    return this._setNounsColorRequested
                }
                setVerbsColorRequested() {
                    return this._setVerbsColorRequested
                }
                setAdjectivesColorRequested() {
                    return this._setAdjectivesColorRequested
                }
                setAdverbsColorRequested() {
                    return this._setAdverbsColorRequested
                }
                onNLXResponseReceived() {
                    return this._nlxResponseReceived
                }
                addLineMarkers() {
                    return this._addLineMarkersRequested
                }
                removeLineMarkers() {
                    return this._removeLineMarkersRequested
                }
                sendNLXRequest(e) {
                    this.postMessageToHost(r.ProcessNLXRequest, e.contextId, e.requestType, e.metaJson ? e.metaJson : "", e.action ? e.action : "", e.version ? e.version : "", e.optionsJson ? e.optionsJson : "", e.dataJson ? e.dataJson : "")
                }
                sendProgressIndicatorVisibility(e) {
                    this.postMessageToHost(r.ProgressIndicatorVisibleHostMessage, e.toString())
                }
                sendTelemetryErrorMeasureNoPII(e, t) {
                    JSON.stringify({
                        errorType: e,
                        errorContent: t
                    }),
                    "ComprehensionTools" !== e && super.sendTelemetryErrorMeasureNoPII(e, t)
                }
                onContentShifted() {
                    return this._onContentShifted
                }
                enableLineFocusRequested() {
                    return this._enableLineFocusRequested
                }
                disableLineFocusRequested() {
                    return this._disableLineFocusRequested
                }
                setNumberOfLinesInFocusRequested() {
                    return this._setNumberOfLinesInFocusRequested
                }
                upButtonClicked() {
                    return this._upButtonClicked
                }
                downButtonClicked() {
                    return this._downButtonClicked
                }
                enablePictureDictionaryRequested() {
                    return this._enablePictureDictionaryRequested
                }
                disablePictureDictionaryRequested() {
                    return this._disablePictureDictionaryRequested
                }
                hidePictureDictionaryPopupRequested() {
                    return this._hidePictureDictionaryPopupRequested
                }
                pictureDictionaryPopupHidden() {
                    return this._pictureDictionaryPopupHidden
                }
                languageChangeRequested() {
                    return this._languageChangeRequested
                }
                languageChangeRequestCompleted() {
                    return this._languageChangeRequestCompleted
                }
                sendComprehensionToolsPaneStatus(e) {
                    const t = e.posLanguageError
                      , i = e.networkError
                      , n = e.syllablesLanguageError;
                    let o = JSON.stringify({
                        isSyllablesActive: e.isSyllablesActive,
                        syllablesError: n,
                        isNounsActive: e.isNounsActive,
                        isVerbsActive: e.isVerbsActive,
                        isAdjectivesActive: e.isAdjectivesActive,
                        isAdverbsActive: e.isAdverbsActive,
                        posError: t,
                        networkError: i,
                        nounsColorIndex: e.nounsColorIndex,
                        verbsColorIndex: e.verbsColorIndex,
                        adjectivesColorIndex: e.adjectivesColorIndex,
                        adverbsColorIndex: e.adverbsColorIndex,
                        isLineMarkersActive: e.isLineMarkersActive,
                        isProgressIndicatorVisible: e.isProgressIndicatorVisible,
                        isPaneDisabled: e.isPaneDisabled
                    });
                    this.postMessageToHost(r.ComprehensionToolsPaneStatusHostMessage, o)
                }
                sendReadingPreferencesPaneStatus(e) {
                    const t = e.pictureDictionaryLanguageError
                      , i = e.pictureDictionaryNetworkError
                      , n = e.isPictureDictionaryActive && e.isPictureDictionaryToggleInteractable && (t !== s.NlxStatus.Success || i !== s.NlxStatus.Success);
                    let o = JSON.stringify({
                        lineFocusButtonVisibility: {
                            isVisible: !0,
                            isActive: e.isLineFocusActive,
                            isEnabled: !0
                        },
                        lineCount: e.lineCount,
                        maxLineCount: e.maxLineCount,
                        isPictureDictionaryActive: e.isPictureDictionaryActive,
                        isPictureDictionaryToggleInteractable: e.isPictureDictionaryToggleInteractable,
                        networkError: i,
                        languageError: t,
                        hasError: n
                    });
                    this.postMessageToHost(r.ReadingPreferencesPaneStatusHostMessage, o)
                }
                sendPartsOfSpeechColorsForThemes(e) {
                    this.postMessageToHost(r.ComprehensionToolsPanePartsOfSpeechColorsForThemesMessage, e)
                }
                sendComprehensionToolsSettings(e) {
                    this.postMessageToHost(r.ComprehensionToolsPreferencesHostMessage, e)
                }
                sendLineFocusSettings(e) {
                    this.postMessageToHost(r.LineFocusPreferencesHostMessage, e)
                }
                onLineFocusExit(e) {
                    const t = JSON.stringify({
                        top: e.top,
                        bottom: e.bottom,
                        left: e.left,
                        right: e.right,
                        width: e.width,
                        height: e.height
                    });
                    this.postMessageToHost(r.LineFocusExitHostMessage, t)
                }
                sendPictureDictionarySettings(e) {
                    this.postMessageToHost(r.PictureDictionaryPreferencesHostMessage, e)
                }
                onMessageFromHost(e) {
                    switch (e[0]) {
                    case r.ComprehensionToolsInitializeSettingsCommand:
                        this._initializeComprehensionToolsSettingsRequested.trigger(e);
                        break;
                    case r.ComprehensionToolsFetchInitialPaneStatusCommand:
                        this._comprehensionToolsInitialPaneStatusRequested.trigger(void 0);
                        break;
                    case r.ReadingPreferencesFetchInitialPaneStatusCommand:
                        this._readingPreferencesInitialPaneStatusRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsSettingsUpdateCommand:
                        this._settingsUpdateRequested.trigger(e[1]);
                        break;
                    case r.ComprehensionToolsAddSyllablesCommand:
                        this._addSyllablesRequested.trigger();
                        break;
                    case r.ComprehensionToolsAddNounsCommand:
                        this._addNounsRequested.trigger();
                        break;
                    case r.ComprehensionToolsAddVerbsCommand:
                        this._addVerbsRequested.trigger();
                        break;
                    case r.ComprehensionToolsAddAdjectivesCommand:
                        this._addAdjectivesRequested.trigger();
                        break;
                    case r.ComprehensionToolsAddAdverbsCommand:
                        this._addAdverbsRequested.trigger();
                        break;
                    case r.ComprehensionToolsRemoveSyllablesCommand:
                        this._removeSyllablesRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsRemoveNounsCommand:
                        this._removeNounsRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsRemoveVerbsCommand:
                        this._removeVerbsRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsRemoveAdjectivesCommand:
                        this._removeAdjectivesRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsRemoveAdverbsCommand:
                        this._removeAdverbsRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsSetNounsColorCommand:
                        this._setNounsColorRequested.trigger(Number(e[1]));
                        break;
                    case r.ComprehensionToolsSetVerbsColorCommand:
                        this._setVerbsColorRequested.trigger(Number(e[1]));
                        break;
                    case r.ComprehensionToolsSetAdjectivesColorCommand:
                        this._setAdjectivesColorRequested.trigger(Number(e[1]));
                        break;
                    case r.ComprehensionToolsSetAdverbsColorCommand:
                        this._setAdverbsColorRequested.trigger(Number(e[1]));
                        break;
                    case r.ComprehensionToolsAddLineMarkersCommand:
                        this._addLineMarkersRequested.trigger(void 0);
                        break;
                    case r.ComprehensionToolsRemoveLineMarkersCommand:
                        this._removeLineMarkersRequested.trigger(void 0);
                        break;
                    case r.ProcessNLXResponse:
                        if (e[1]) {
                            let t = JSON.parse(e[1]);
                            "Service" === t.processedBy && t.responseData && (t = this.convertToExpectedNLXResponseFormat(t)),
                            this._nlxResponseReceived.trigger(t)
                        }
                        break;
                    case r.LineFocusInitializeSettingsCommand:
                        this._initializeLineFocusSettingsRequested.trigger(e);
                        break;
                    case r.LineFocusEnableCommand:
                        this._enableLineFocusRequested.trigger(Number(e[1]));
                        break;
                    case r.LineFocusDisableCommand:
                        this._disableLineFocusRequested.trigger(Number(e[1]));
                        break;
                    case r.LineFocusUpButtonClickedCommand:
                        this._upButtonClicked.trigger(void 0);
                        break;
                    case r.LineFocusDownButtonClickedCommand:
                        this._downButtonClicked.trigger(void 0);
                        break;
                    case r.LineFocusSetNumberOfLinesCommand:
                        let t = Number(e[1]);
                        this._setNumberOfLinesInFocusRequested.trigger(t);
                        break;
                    case r.ReadingViewContentShifted:
                        this._onContentShifted.trigger(void 0);
                        break;
                    case r.PictureDictionaryInitializeSettingsCommand:
                        this._initializePictureDictionarySettingsRequested.trigger(e);
                        break;
                    case r.PictureDictionaryEnableCommand:
                        this._enablePictureDictionaryRequested.trigger(void 0);
                        break;
                    case r.PictureDictionaryDisableCommand:
                        this._disablePictureDictionaryRequested.trigger(void 0);
                        break;
                    case r.LearningToolsLanguageChangeRequestedCommand:
                        this._languageChangeRequested.trigger(void 0);
                        break;
                    case r.PictureDictionaryHidePopupCommand:
                        this._hidePictureDictionaryPopupRequested.trigger(void 0);
                        break;
                    case r.PictureDictionaryPopupHiddenCommand:
                        this._pictureDictionaryPopupHidden.trigger(void 0);
                        break;
                    case r.LearningToolsLanguageChangeRequestCompletedCommand:
                        this._languageChangeRequestCompleted.trigger(void 0);
                        break;
                    default:
                        super.onMessageFromHost(e)
                    }
                }
                convertToExpectedNLXResponseFormat(e) {
                    let t = JSON.parse(e.responseData);
                    return {
                        contextId: e.contextId,
                        responseType: e.responseType,
                        metaJson: t.meta ? JSON.stringify(t.meta) : "",
                        version: t.data.version ? t.data.version : "",
                        status: t.status ? t.status : "",
                        dataJson: t.data ? JSON.stringify(t.data) : "",
                        errorJson: t.error ? JSON.stringify(t.error) : "",
                        processedBy: e.processedBy
                    }
                }
            }
            r.ShowProgressIndicatorCommand = "ShowProgressIndicator",
            r.LineFocusEnableCommand = "LineFocus_Enable",
            r.LineFocusDisableCommand = "LineFocus_Disable",
            r.LineFocusSetNumberOfLinesCommand = "LineFocus_SetNumberOfLines",
            r.LineFocusUpButtonClickedCommand = "LineFocus_UpButtonClicked",
            r.LineFocusDownButtonClickedCommand = "LineFocus_DownButtonClicked",
            r.ComprehensionToolsAddSyllablesCommand = "ComprehensionTools_AddSyllables",
            r.ComprehensionToolsAddNounsCommand = "ComprehensionTools_AddNouns",
            r.ComprehensionToolsAddVerbsCommand = "ComprehensionTools_AddVerbs",
            r.ComprehensionToolsAddAdjectivesCommand = "ComprehensionTools_AddAdjectives",
            r.ComprehensionToolsAddAdverbsCommand = "ComprehensionTools_AddAdverbs",
            r.ComprehensionToolsRemoveSyllablesCommand = "ComprehensionTools_RemoveSyllables",
            r.ComprehensionToolsRemoveNounsCommand = "ComprehensionTools_RemoveNouns",
            r.ComprehensionToolsRemoveVerbsCommand = "ComprehensionTools_RemoveVerbs",
            r.ComprehensionToolsRemoveAdjectivesCommand = "ComprehensionTools_RemoveAdjectives",
            r.ComprehensionToolsRemoveAdverbsCommand = "ComprehensionTools_RemoveAdverbs",
            r.ComprehensionToolsSetNounsColorCommand = "ComprehensionTools_SetNounsColor",
            r.ComprehensionToolsSetVerbsColorCommand = "ComprehensionTools_SetVerbsColor",
            r.ComprehensionToolsSetAdjectivesColorCommand = "ComprehensionTools_SetAdjectivesColor",
            r.ComprehensionToolsSetAdverbsColorCommand = "ComprehensionTools_SetAdverbsColor",
            r.ComprehensionToolsAddLineMarkersCommand = "ComprehensionTools_AddLineMarkers",
            r.ComprehensionToolsRemoveLineMarkersCommand = "ComprehensionTools_RemoveLineMarkers",
            r.ProcessNLXResponse = "GrammarTools_Response",
            r.ComprehensionToolsInitializeSettingsCommand = "ComprehensionTools_InitializeSettings",
            r.PictureDictionaryInitializeSettingsCommand = "PictureDictionary_InitializeSettings",
            r.LineFocusInitializeSettingsCommand = "LineFocus_InitializeSettings",
            r.ComprehensionToolsSettingsUpdateCommand = "ComprehensionTools_SettingsUpdate",
            r.ComprehensionToolsFetchInitialPaneStatusCommand = "ComprehensionTools_FetchInitialPaneStatus",
            r.PictureDictionaryEnableCommand = "PictureDictionary_Enable",
            r.PictureDictionaryDisableCommand = "PictureDictionary_Disable",
            r.PictureDictionaryPopupHiddenCommand = "PictureDictionary_PopupHidden",
            r.PictureDictionaryHidePopupCommand = "PictureDictionary_HidePopupCommand",
            r.ReadingViewContentShifted = "ReadingView_ContentShifted",
            r.ReadingPreferencesFetchInitialPaneStatusCommand = "ReadingPreference_FetchInitialPaneStatus",
            r.LearningToolsLanguageChangeRequestedCommand = "LearningTools_LanguageChangeRequested",
            r.LearningToolsLanguageChangeRequestCompletedCommand = "LearningTools_LanguageChangeRequestCompleted",
            r.ComprehensionToolsPreferencesHostMessage = "GrammarTools_Preferences",
            r.ProcessNLXRequest = "NLXRequest",
            r.ComprehensionToolsPaneStatusHostMessage = "ComprehensionToolsPane_Status",
            r.ReadingPreferencesPaneStatusHostMessage = "ReadingPreferencesPane_Status",
            r.ComprehensionToolsPanePartsOfSpeechColorsForThemesMessage = "ComprehensionToolsPane_PartsOfSpeechColorsForThemes",
            r.PictureDictionaryPreferencesHostMessage = "PictureDictionary_Preferences",
            r.LineFocusPreferencesHostMessage = "LineFocus_Preferences",
            r.LineFocusExitHostMessage = "LineFocus_ExitedMessage",
            r.ProgressIndicatorVisibleHostMessage = "ComprehensionTools_SetProgressIndicatorVisibility",
            t.LearningToolsHostProxy = r
        }
        ,
        9351: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.HostProxy = void 0;
            const n = i(864)
              , o = i(4349)
              , s = i(2554)
              , r = i(8095)
              , a = i(8773);
            class d {
                constructor(e) {
                    this._messageRuntime = e,
                    this._readOutLoudOnContextFromFrame = new n.EventSource,
                    this._readOutLoudFocusChanged = new n.EventSource,
                    this._readOutLoudStartRequested = new n.EventSource,
                    this._readOutLoudStopRequested = new n.EventSource,
                    this._readOutLoudPauseRequested = new n.EventSource,
                    this._readOutLoudNextRequested = new n.EventSource,
                    this._readOutLoudPreviousRequested = new n.EventSource,
                    this._readOutLoudPreloadRequest = new n.EventSource,
                    this._readOutLoudChangeRateRequested = new n.EventSource,
                    this._readOutLoudChangeVoiceRequested = new n.EventSource,
                    this._readOutLoudSpeechPrefChanged = new n.EventSource,
                    this._readOutLoudInitializeSettingsRequested = new n.EventSource,
                    this._languageDetected = new n.EventSource,
                    this._sdPrimaryContentFetched = new n.EventSource,
                    this._telemetryClient = new a.TelemetryClient(this),
                    this._messageRuntime.onMessageFromHost().subscribe((e=>{
                        this.onMessageFromHost(e)
                    }
                    ))
                }
                getTelemetryClient() {
                    return this._telemetryClient
                }
                readOutLoudSpeechPrefChanged() {
                    return this._readOutLoudSpeechPrefChanged
                }
                readOutLoudFocusChanged() {
                    return this._readOutLoudFocusChanged
                }
                readOutLoudOnContextFromFrame() {
                    return this._readOutLoudOnContextFromFrame
                }
                readOutLoudStartRequested() {
                    return this._readOutLoudStartRequested
                }
                readOutLoudStopRequested() {
                    return this._readOutLoudStopRequested
                }
                readOutLoudPauseRequested() {
                    return this._readOutLoudPauseRequested
                }
                readOutLoudNextRequested() {
                    return this._readOutLoudNextRequested
                }
                readOutLoudPreviousRequested() {
                    return this._readOutLoudPreviousRequested
                }
                readOutLoudPreloadRequested() {
                    return this._readOutLoudPreloadRequest
                }
                readOutLoudChangeVoiceRequested() {
                    return this._readOutLoudChangeVoiceRequested
                }
                readOutLoudChangeRateRequested() {
                    return this._readOutLoudChangeRateRequested
                }
                readOutLoudInitializeSettingsRequested() {
                    return this._readOutLoudInitializeSettingsRequested
                }
                languageDetected() {
                    return this._languageDetected
                }
                sdPrimaryContentFetched() {
                    return this._sdPrimaryContentFetched
                }
                sendSpeechPreferences(e) {
                    this.postMessageToHost(d.ReadOutLoudSpeechPreferencesHostMessage, e)
                }
                sendReadOutLoudFocusReceived(e) {
                    this.postMessageToHost(d.ReadOutLoudFocusReceivedHostMessage, e.frameTreeNodeId.toString(), e.processId.toString())
                }
                sendContextToFocusedFrame(e) {
                    this.postMessageToHost(d.ReadOutLoudSendContextToFrameHostMessage, JSON.stringify(e))
                }
                sendReadOutLoudStatus(e, t, i, n) {
                    let o = t === r.ReadingState.Playing
                      , s = t === r.ReadingState.Playing || t === r.ReadingState.Paused || t == r.ReadingState.InteractionsDisabled || t == r.ReadingState.Uninitialized
                      , a = t != r.ReadingState.InteractionsDisabled && t != r.ReadingState.Uninitialized
                      , l = JSON.stringify({
                        previousButtonVisibility: {
                            isVisible: s,
                            isActive: !0,
                            isEnabled: o
                        },
                        nextButtonVisibility: {
                            isVisible: s,
                            isActive: !0,
                            isEnabled: o
                        },
                        togglePlaybackButtonVisibility: {
                            isVisible: s,
                            isActive: !o,
                            isEnabled: a
                        },
                        settingsButtonVisibility: {
                            isVisible: s,
                            isActive: !0,
                            isEnabled: a
                        },
                        settingsButtonWarningVisibility: {
                            isVisible: s && !i,
                            isActive: !0,
                            isEnabled: !0
                        },
                        closeButtonVisibility: {
                            isVisible: s,
                            isActive: !0,
                            isEnabled: !0
                        },
                        textReadingState: r.ReadingState[t].toLowerCase()
                    })
                      , u = "";
                    n && (u = JSON.stringify({
                        top: n.top,
                        bottom: n.bottom,
                        left: n.left,
                        right: n.right,
                        width: n.width,
                        height: n.height
                    })),
                    this.postMessageToHost(d.ReadOutLoudStatusHostMessage, e.frameTreeNodeId.toString(), e.processId.toString(), l, r.ReadingState[t], u)
                }
                sendSpeechSettings(e, t, i) {
                    let n = JSON.stringify({
                        supportedVoices: i,
                        currentVoiceURI: t,
                        currentReadingRate: e
                    });
                    this.postMessageToHost(d.ReadOutLoudSpeechSettingsHostMessage, n)
                }
                sendTelemetryErrorMeasureNoPII(e, t) {
                    let i = JSON.stringify({
                        errorType: e,
                        errorContent: t
                    });
                    this.postMessageToHost(d.ReadOutLoudJsErrorTelemetryHostMessage, i)
                }
                sendTelemetry(e, t, i, ...n) {
                    n && n.length > 0 ? (n.unshift(i),
                    n.unshift(t),
                    n.unshift(e)) : n = [e, t, i],
                    this.postMessageToHost(d.TelemetryMessage, ...n)
                }
                detectLanguage(e) {
                    this.postMessageToHost(d.DetectLanguageHostMessage, e.frameTreeNodeId.toString(), e.processId.toString())
                }
                detectTextLanguage(e) {
                    return this._messageRuntime.detectTextLanguage(e)
                }
                fetchSDPrimaryContent() {
                    this.postMessageToHost(d.ReadAloudFetchSDPrimaryContent)
                }
                raiseMessageFromHost(e) {
                    this.onMessageFromHost(e)
                }
                postMessageToHost(e, ...t) {
                    this._messageRuntime.postMessageToHost(e, t)
                }
                onMessageFromHost(e) {
                    switch (e[0]) {
                    case d.ReadOutLoudFocusChangedCommand:
                        this._readOutLoudFocusChanged.trigger(void 0);
                        break;
                    case d.ReadOutLoudOnContextFromFrameCommand:
                        let t = o.JsonUtilities.parseJsonOrNull(e[1], "ReadOutLoud", s.ReadAloudErrors[s.ReadAloudErrors.JSONParsing_ReadOutLoudSpeechPreferences_ScopeState], this._telemetryClient);
                        this._readOutLoudOnContextFromFrame.trigger(t);
                        break;
                    case d.ReadOutLoudStartCommand:
                        let i = this.parseStartParams(e);
                        this._readOutLoudStartRequested.trigger(i);
                        break;
                    case d.ReadOutLoudStopCommand:
                        this._readOutLoudStopRequested.trigger(void 0);
                        break;
                    case d.ReadOutLoudPauseCommand:
                        this._readOutLoudPauseRequested.trigger(void 0);
                        break;
                    case d.ReadOutLoudNextCommand:
                        this._readOutLoudNextRequested.trigger(void 0);
                        break;
                    case d.ReadOutLoudPreviousCommand:
                        this._readOutLoudPreviousRequested.trigger(void 0);
                        break;
                    case d.ReadOutLoudPreloadCommand:
                        let n = Number(e[1])
                          , r = Number(e[2]);
                        this._readOutLoudPreloadRequest.trigger([n, r]);
                        break;
                    case d.ReadOutLoudChangeVoiceCommand:
                        this._readOutLoudChangeVoiceRequested.trigger(e[1]),
                        this.postMessageToHost(d.ReadAloudExplicitVoiceChangeByUser);
                        break;
                    case d.ReadOutLoudChangeRateCommand:
                        let a = Number(e[1]);
                        this._readOutLoudChangeRateRequested.trigger(a);
                        break;
                    case d.PreferencesChangedCommand:
                        this.handlePreferencesChanged(e);
                        break;
                    case d.ReadOutLoudInitializeSettingsCommand:
                        this._readOutLoudInitializeSettingsRequested.trigger(e);
                        break;
                    case d.LanguageDetected:
                        this._languageDetected.trigger(e[1]);
                        break;
                    case d.ReadOutLoudFirstContentfulPaintLoadedCommand:
                        break;
                    case d.ReadAloudSDPrimaryContentFetched:
                        this._sdPrimaryContentFetched.trigger(e[1]);
                        break;
                    default:
                        throw Error("Unknown Command")
                    }
                }
                parseStartParams(e) {
                    let t = {
                        startRequestTime: 0,
                        startType: r.StartType.Default,
                        startPosition: {
                            x: 0,
                            y: 0
                        },
                        needsTransformOfStartPosition: !1
                    }
                      , i = parseFloat(e[1]);
                    if (i && (t.startRequestTime = i),
                    e.length > 2) {
                        let i = e[2];
                        if (i && (t.startType = r.StartType[i],
                        t.startType === r.StartType.ReadFromPoint)) {
                            let i = parseInt(e[3]);
                            i && (t.startPosition.x = i);
                            let n = parseInt(e[4]);
                            n && (t.startPosition.y = n),
                            e[5] && (t.needsTransformOfStartPosition = "true" === e[5])
                        }
                    }
                    return t
                }
                handlePreferencesChanged(e) {
                    if (e[1] !== d.SpeechPreferences)
                        throw Error("Unknown Preferences");
                    this._readOutLoudSpeechPrefChanged.trigger(e[2])
                }
            }
            d.ReadOutLoudStartCommand = "ReadOutLoud_Start",
            d.ReadOutLoudStopCommand = "ReadOutLoud_Stop",
            d.ReadOutLoudPauseCommand = "ReadOutLoud_Pause",
            d.ReadOutLoudNextCommand = "ReadOutLoud_Next",
            d.ReadOutLoudPreviousCommand = "ReadOutLoud_Previous",
            d.ReadOutLoudPreloadCommand = "ReadOutLoud_Preload",
            d.ReadOutLoudChangeVoiceCommand = "ReadOutLoud_ChangeVoice",
            d.ReadOutLoudChangeRateCommand = "ReadOutLoud_ChangeRate",
            d.ReadOutLoudFirstContentfulPaintLoadedCommand = "ReadOutLoud_FirstContentfulPaintLoaded",
            d.ReadOutLoudFocusChangedCommand = "ReadOutLoud_FocusChanged",
            d.ReadOutLoudOnContextFromFrameCommand = "ReadOutLoud_OnContextFromFrame",
            d.PreferencesChangedCommand = "PreferencesChanged",
            d.ReadOutLoudInitializeSettingsCommand = "ReadOutLoud_InitializeSettings",
            d.LanguageDetected = "ReadAloud_DetectedLanguage",
            d.OpenVoiceOptionsPane = "ReadAloud_ShowSettings",
            d.CloseVoiceOptionsPane = "ReadAloud_HideSettings",
            d.ReadAloudSDPrimaryContentFetched = "ReadAloud_SDPrimaryContentFetched",
            d.ReadOutLoudJsErrorTelemetryHostMessage = "ReadOutLoud_Telemetry_JsError",
            d.TelemetryMessage = "Telemetry",
            d.ReadOutLoudSpeechSettingsHostMessage = "ReadOutLoud_SpeechSettings",
            d.ReadOutLoudSpeechPreferencesHostMessage = "ReadOutLoud_SpeechPreferences",
            d.ReadOutLoudStatusHostMessage = "ReadOutLoud_Status",
            d.ReadOutLoudFocusReceivedHostMessage = "ReadOutLoud_FocusReceived",
            d.ReadOutLoudSendContextToFrameHostMessage = "ReadOutLoud_SendContextToFocusedFrame",
            d.VoiceOptionsPaneOpened = "ReadAloud_VoiceOptionsPaneOpened",
            d.VoiceOptionsPaneClosed = "ReadAloud_VoiceOptionsPaneClosed",
            d.ReadAloudExplicitVoiceChangeByUser = "ReadAloud_ExplicitVoiceChangeByUser",
            d.ReadAloudFetchSDPrimaryContent = "ReadAloud_FetchSDPrimaryContent",
            d.SpeechPreferences = "SpeechPreferences",
            d.DetectLanguageHostMessage = "ReadAloud_DetectLanguage",
            t.HostProxy = d
        }
        ,
        8830: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.CuratedContentReadingUnitNavigator = void 0;
            const n = i(5305)
              , o = i(3755)
              , s = i(262)
              , r = i(2042)
              , a = i(6164)
              , d = i(2554)
              , l = i(9762);
            t.CuratedContentReadingUnitNavigator = class {
                constructor(e, t) {
                    this._readableContent = e,
                    this._telemetryClient = t,
                    this.resetReadingPosition()
                }
                setStartingNode(e, t) {
                    throw new Error("Method not implemented.")
                }
                setEndingNode(e, t=0) {
                    throw new Error("Method not implemented.")
                }
                resetEndNode() {}
                getCurrentUnit() {
                    return this._currentStringIndex < 0 || 0 === this._readingUnits.length || this._currentStringIndex >= this._readingUnits.length ? null : this._readingUnits[this._currentStringIndex]
                }
                moveByAUnit(e) {
                    var t, i;
                    if (e === a.UnitDirection.Next) {
                        if (this._readingUnits.length && this._currentStringIndex < this._readingUnits.length - 1)
                            return this._currentStringIndex++,
                            this.resetReadingUnitStartTextOffset(this._currentStringIndex),
                            r.UnitNavigationStatus.Success;
                        if (this._currentStringIndex >= this._readableContent.length - 1)
                            return this._currentStringIndex === this._readableContent.length - 1 && this._currentStringIndex++,
                            r.UnitNavigationStatus.ContentEnded;
                        if (this._currentStringIndex < this._readableContent.length - 1) {
                            let e = this._readableContent[this._currentStringIndex + 1];
                            if (this.mayBeUseH1TagForNavigation())
                                return r.UnitNavigationStatus.Success;
                            let o = n.FindInPage.findString(e, this.nodeFilter);
                            if (!o || !o.nodes) {
                                null === (t = this._telemetryClient) || void 0 === t || t.reportReadOutLoudSmartReadStatus(d.SmartReadStatus.ContentNoMatch);
                                const e = this._readableContent.join("").length
                                  , n = this._readableContent.slice(0, this._currentStringIndex + 1).join("").length;
                                return null === (i = this._telemetryClient) || void 0 === i || i.reportReadOutLoudSmartReadContentMatch(100 * n / e),
                                this._currentStringIndex = -1,
                                r.UnitNavigationStatus.Error
                            }
                            let a = [];
                            o.nodes.forEach((e=>a.push(e)));
                            let l = new s.HTMLReadingUnit(a,0);
                            return this._currentStringIndex++,
                            this._readingUnits.push(l),
                            r.UnitNavigationStatus.Success
                        }
                        return r.UnitNavigationStatus.ContentEnded
                    }
                    if (e === a.UnitDirection.Previous)
                        return this._currentStringIndex <= 0 ? (0 === this._currentStringIndex && this._currentStringIndex--,
                        r.UnitNavigationStatus.ContentEnded) : (this._currentStringIndex--,
                        this.resetReadingUnitStartTextOffset(this._currentStringIndex),
                        r.UnitNavigationStatus.Success);
                    throw new Error("moveByAUnit should not be called with Direction as Current")
                }
                resetReadingPosition() {
                    this._readingUnits = [],
                    this._currentStringIndex = -1,
                    n.FindInPage.reset()
                }
                nodeFilter(e) {
                    return !o.ReadingNavigationUtils.shouldSkipNode(e)
                }
                resetReadingUnitStartTextOffset(e) {
                    e < 0 || e >= this._readingUnits.length || (this._readingUnits[e].textStartOffset = 0)
                }
                mayBeUseH1TagForNavigation() {
                    if (-1 === this._currentStringIndex) {
                        let e = this._readableContent[this._currentStringIndex + 1];
                        const t = o.ReadingNavigationUtils.findFirsth1Tag(document);
                        if (!o.ReadingNavigationUtils.shouldSkipNode(t) && l.StringUtilities.ExactMatchWithoutSpaceAndSpecialChar(t.textContent, e)) {
                            let e = o.ReadingNavigationUtils.getTextNodes(t)
                              , i = new s.HTMLReadingUnit(e,0);
                            return this._currentStringIndex++,
                            this._readingUnits.push(i),
                            !0
                        }
                    }
                    return !1
                }
            }
        }
        ,
        6164: (e,t)=>{
            var i;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.UnitDirection = void 0,
            (i = t.UnitDirection || (t.UnitDirection = {}))[i.Next = 0] = "Next",
            i[i.Previous = 1] = "Previous",
            i[i.Current = 2] = "Current"
        }
        ,
        5002: function(e, t, i) {
            var n = this && this.__awaiter || function(e, t, i, n) {
                return new (i || (i = Promise))((function(o, s) {
                    function r(e) {
                        try {
                            d(n.next(e))
                        } catch (e) {
                            s(e)
                        }
                    }
                    function a(e) {
                        try {
                            d(n.throw(e))
                        } catch (e) {
                            s(e)
                        }
                    }
                    function d(e) {
                        var t;
                        e.done ? o(e.value) : (t = e.value,
                        t instanceof i ? t : new i((function(e) {
                            e(t)
                        }
                        ))).then(r, a)
                    }
                    d((n = n.apply(e, t || [])).next())
                }
                ))
            }
            ;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.HTMLReadingNavigator = void 0;
            const o = i(5450)
              , s = i(913)
              , r = i(562)
              , a = i(2042)
              , d = i(949)
              , l = i(8830)
              , u = i(6164)
              , c = i(8095)
              , h = i(8366)
              , g = i(3387)
              , m = i(4912)
              , _ = i(2554)
              , p = i(3755);
            class R extends o.ReadingNavigator {
                constructor(e, t) {
                    super();
                    const i = m.FeatureList.get();
                    this._isMsnArticleAndReadSmartEnabled = i && i.isMSNArticleAndSmartReadAloudEnabled(),
                    this._contentProvider = e,
                    this._telemetryClient = t,
                    this._readingUnit = null,
                    this._msnArticleTitleNode = null,
                    this._startParams = null
                }
                initializeAsync(e) {
                    var t;
                    return this._startParams = e,
                    this.isCuratedContentNavigatorInUse() && e.startType === c.StartType.ResumeFromSelection && (null === (t = this._telemetryClient) || void 0 === t || t.reportReadOutLoudSmartReadStatus(_.SmartReadStatus.UserInitiatedFallbackContextMenu)),
                    this.isCuratedContentBasedNavigationSupported(e) ? this.ensureAndInitializeCuratedContentReadingUnitNavigator(e) : this.ensureAndInitializeReadingUnitNavigator(e)
                }
                reset() {
                    this._styleElementToShadowRootResource && (this._styleElementToShadowRootResource.release(),
                    this._styleElementToShadowRootResource = null),
                    this._readingUnit = null,
                    this._readingUnitNavigator.resetEndNode()
                }
                moveToPreviousUnitAsync() {
                    return n(this, void 0, void 0, (function*() {
                        return this._readingUnit = yield this.moveAndGetReadingUnit(u.UnitDirection.Previous),
                        this._readingUnit ? Promise.resolve(!0) : Promise.resolve(!1)
                    }
                    ))
                }
                moveToNextUnitAsync() {
                    return n(this, void 0, void 0, (function*() {
                        return this._readingUnit = yield this.moveAndGetReadingUnit(u.UnitDirection.Next),
                        this._readingUnit ? Promise.resolve(!0) : Promise.resolve(!1)
                    }
                    ))
                }
                getCurrentUnit() {
                    return this._readingUnit
                }
                setCurrentUnitTextOffset(e) {
                    this._readingUnit.textStartOffset = e
                }
                resetCurrentUnitEndOffset() {
                    this._readingUnit.textEndOffset = null,
                    this._readingUnitNavigator.resetEndNode()
                }
                isCuratedContentNavigatorInUse() {
                    return this._readingUnitNavigator instanceof l.CuratedContentReadingUnitNavigator
                }
                setStartingNodeAtCoordinates(e, t) {
                    let i = e=>e.getBoundingClientRect()
                      , n = h.DomUtilties.getTextNodeFromPoint(e, t.x, t.y, i);
                    if (n) {
                        let o = h.DomUtilties.getOffsetInTextNodeForLineAtYPosition(e, n, t.y, i);
                        return this._readingUnitNavigator.setStartingNode(n, o),
                        !0
                    }
                    return !1
                }
                initializeMSNArticleSmartReadAloud() {
                    const e = this._contentProvider.getCurrentDocument();
                    this.setMSNArticleTitleNode(e),
                    this.setMSNArticleContentNode(e)
                }
                setMSNArticleContentNode(e) {
                    const t = e.getElementsByTagName("article");
                    this._readingUnitNavigator instanceof d.ReadingUnitNavigator && 0 !== t.length && this._readingUnitNavigator.setMSNArticleContentNode(t[0])
                }
                setMSNArticleTitleNode(e) {
                    let t = e.querySelector("msnews-views-title").shadowRoot;
                    if (t) {
                        let e = t.querySelector("h1");
                        if (e) {
                            if (this._readingUnitNavigator instanceof d.ReadingUnitNavigator && this._readingUnitNavigator.setMSNArticleTitleNode(e),
                            !t.querySelector("style")) {
                                const e = h.DomUtilties.MSNArticleReadAloudWebHighlighterStyle;
                                this._styleElementToShadowRootResource = h.DomUtilties.addRemoveStyleToShadowRoot(e, t)
                            }
                            this._msnArticleTitleNode = e
                        }
                    }
                }
                getMSNArticleTitleNode() {
                    return this._msnArticleTitleNode
                }
                isReadAloudCuratedContentEnabled() {
                    return !(this._contentProvider.getContentType() !== r.ContentType.Web || !learningToolsNativeHandler || !learningToolsNativeHandler.isReadAloudCuratedContentEnabled) && learningToolsNativeHandler.isReadAloudCuratedContentEnabled()
                }
                sourceNodeOccursBeforeInViewport(e, t) {
                    return 0 != (e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING)
                }
                ensureAndInitializeReadingUnitNavigator(e) {
                    let t = this._contentProvider.getCurrentDocument();
                    if (this._readingUnitNavigator && this._readingUnitNavigator instanceof d.ReadingUnitNavigator || (this._readingUnitNavigator = new d.ReadingUnitNavigator),
                    e.startType === c.StartType.ReadFromFirstVisibleElement) {
                        let i = window.pageYOffset || document.documentElement.scrollTop;
                        if (e.startPosition.y = i,
                        this.setStartingNodeAtCoordinates(t, e.startPosition))
                            return Promise.resolve(!0)
                    } else if (e.startType === c.StartType.ReadFromPoint && (e.needsTransformOfStartPosition && (e.startPosition = g.ScreenCoordinateUtilities.transformPointFromMainToCurrentFrame(e.startPosition),
                    e.needsTransformOfStartPosition = !1),
                    this.setStartingNodeAtCoordinates(t, e.startPosition)))
                        return Promise.resolve(!0);
                    let i = t.getSelection();
                    if (0 === i.rangeCount) {
                        if (null !== this._readingUnit)
                            return Promise.resolve(!0);
                        this.resetSelection(!1),
                        i = t.getSelection()
                    }
                    if (this._isMsnArticleAndReadSmartEnabled && this.initializeMSNArticleSmartReadAloud(),
                    e.startType === c.StartType.Default)
                        if (this.resetSelection(!0),
                        i = t.getSelection(),
                        this.isReadAloudCuratedContentEnabled()) {
                            let e = p.ReadingNavigationUtils.findFirsth1Tag(t);
                            this._readingUnitNavigator.setStartingNode(e && this.sourceNodeOccursBeforeInViewport(e, t.body) ? e : t.body)
                        } else
                            this._readingUnitNavigator.setStartingNode(t.body);
                    if (0 !== i.rangeCount) {
                        let n = i.getRangeAt(0)
                          , o = n.startContainer;
                        if (o.ownerDocument === t) {
                            if (e.startType === c.StartType.ReadSelection && (n.endContainer.nodeType === Node.TEXT_NODE ? this._readingUnitNavigator.setEndingNode(n.endContainer, n.endOffset) : n.endContainer.nodeType === Node.ELEMENT_NODE && this._readingUnitNavigator.setEndingNode(n.endContainer)),
                            o.nodeType === Node.TEXT_NODE) {
                                if (this._readingUnitNavigator.setStartingNode(o, n.startOffset),
                                this.collapseSelectionToNode(o.parentElement, 0),
                                e.startType === c.StartType.Default && this.isReadAloudCuratedContentEnabled()) {
                                    let e = p.ReadingNavigationUtils.findFirsth1Tag(t);
                                    e && this.sourceNodeOccursBeforeInViewport(e, o.parentElement) && (this._readingUnitNavigator.setStartingNode(e),
                                    this.collapseSelectionToNode(e.parentElement, 0))
                                }
                            } else if (o.nodeType === Node.ELEMENT_NODE)
                                if (o.hasChildNodes()) {
                                    if (n.startOffset >= o.childNodes.length)
                                        this._readingUnitNavigator.setStartingNode(o.nextSibling),
                                        this.collapseSelectionToNode(o, 0);
                                    else if (this._readingUnitNavigator.setStartingNode(o.childNodes.item(n.startOffset)),
                                    this.collapseSelectionToNode(o, 0),
                                    this.collapseSelectionToNode(o.parentElement, 0),
                                    e.startType === c.StartType.Default && this.isReadAloudCuratedContentEnabled()) {
                                        let e = p.ReadingNavigationUtils.findFirsth1Tag(t);
                                        e && this.sourceNodeOccursBeforeInViewport(e, o.parentElement) && (this._readingUnitNavigator.setStartingNode(e),
                                        this.collapseSelectionToNode(e.parentElement, 0))
                                    }
                                } else
                                    this._readingUnitNavigator.setStartingNode(o),
                                    this.collapseSelectionToNode(o, 0)
                        } else if (e.startType === c.StartType.Default && this.isReadAloudCuratedContentEnabled()) {
                            let e = p.ReadingNavigationUtils.findFirsth1Tag(t)
                              , i = this.sourceNodeOccursBeforeInViewport(e, t.body);
                            this._readingUnitNavigator.setStartingNode(e && i ? e : t.body),
                            this.collapseSelectionToNode(e && i ? e : t.body, 0)
                        } else
                            this._readingUnitNavigator.setStartingNode(t.body),
                            this.collapseSelectionToNode(t.body, 0)
                    }
                    return Promise.resolve(!0)
                }
                ensureAndInitializeCuratedContentReadingUnitNavigator(e) {
                    var t, i, o, r;
                    return n(this, void 0, void 0, (function*() {
                        if (null === (t = this._telemetryClient) || void 0 === t || t.reportReadOutLoudSmartReadStatus(_.SmartReadStatus.Start),
                        !this._readingUnitNavigator || !this.isCuratedContentNavigatorInUse()) {
                            let t = [];
                            try {
                                if (t = yield this._contentProvider.getPrimaryContent(),
                                !t || t.length < 1)
                                    return null === (i = this._telemetryClient) || void 0 === i || i.reportReadOutLoudSmartReadStatus(_.SmartReadStatus.ContentEmptyNonPaywalled),
                                    this.ensureAndInitializeReadingUnitNavigator(e);
                                if (t.join("").length < 500)
                                    return null === (o = this._telemetryClient) || void 0 === o || o.reportReadOutLoudSmartReadStatus(_.SmartReadStatus.ContentLow),
                                    this.ensureAndInitializeReadingUnitNavigator(e)
                            } catch (t) {
                                if (t instanceof Error) {
                                    let e = s.SmartReadAloudUtils.getSmartReadStatusFromError(t);
                                    e && (null === (r = this._telemetryClient) || void 0 === r || r.reportReadOutLoudSmartReadStatus(e))
                                }
                                return this.ensureAndInitializeReadingUnitNavigator(e)
                            }
                            this._readingUnitNavigator = new l.CuratedContentReadingUnitNavigator(t,this._telemetryClient)
                        }
                        return this._readingUnitNavigator.resetReadingPosition(),
                        Promise.resolve(!0)
                    }
                    ))
                }
                moveAndGetReadingUnit(e) {
                    return n(this, void 0, void 0, (function*() {
                        return this._readingUnitNavigator.moveByAUnit(e) === a.UnitNavigationStatus.Error && this.isCuratedContentNavigatorInUse() && (yield this.overrideAndMoveUsingLegacyUnitNavigator(e)),
                        this._readingUnitNavigator.getCurrentUnit()
                    }
                    ))
                }
                overrideAndMoveUsingLegacyUnitNavigator(e) {
                    return n(this, void 0, void 0, (function*() {
                        this._readingUnit ? (this._readingUnitNavigator = new d.ReadingUnitNavigator,
                        this._readingUnitNavigator.setStartingNode(this._readingUnit.contentNodes.pop()),
                        this._readingUnitNavigator.moveByAUnit(e),
                        this._readingUnitNavigator.moveByAUnit(e)) : (yield this.ensureAndInitializeReadingUnitNavigator(this._startParams),
                        this._readingUnitNavigator.moveByAUnit(e))
                    }
                    ))
                }
            }
            t.HTMLReadingNavigator = R
        },
        262: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.HTMLReadingUnit = void 0;
            const n = i(1014);
            class o extends n.ReadingUnit {
                constructor(e, t, i) {
                    super(t, i),
                    this._contentNodes = e,
                    this._textContents = this.updateTextContents()
                }
                get contentNodes() {
                    return this._textContents = this.updateTextContents(),
                    this._contentNodes
                }
                set contentNodes(e) {
                    this._contentNodes = e,
                    this._textContents = this.updateTextContents()
                }
                get textContents() {
                    return this._textContents
                }
                updateTextContents() {
                    return this._contentNodes.map((e=>o.EmptyTagNodeList.includes(e.nodeName.toUpperCase()) ? " " : e.textContent))
                }
            }
            o.EmptyTagNodeList = ["BR", "HR", "IMG", "INPUT"],
            t.HTMLReadingUnit = o
        }
        ,
        9612: (e,t)=>{
            var i;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.DecorationType = void 0,
            (i = t.DecorationType || (t.DecorationType = {}))[i.Word = 1] = "Word",
            i[i.Line = 2] = "Line",
            i[i.Background = 4] = "Background",
            i[i.All = 7] = "All",
            i[i.ExceptWord = 6] = "ExceptWord",
            i[i.WordAndLine = 3] = "WordAndLine"
        }
        ,
        2042: (e,t)=>{
            var i;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.UnitNavigationStatus = void 0,
            (i = t.UnitNavigationStatus || (t.UnitNavigationStatus = {}))[i.ContentEnded = 0] = "ContentEnded",
            i[i.Error = 1] = "Error",
            i[i.Success = 2] = "Success"
        }
        ,
        8261: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadOutLoudHighlighter = void 0;
            const n = i(5209)
              , o = i(9762)
              , s = i(4912)
              , r = i(8366);
            (t.ReadOutLoudHighlighter || (t.ReadOutLoudHighlighter = {})).surroundTextBySpans = function(e, t, i) {
                let a = n.Highlighter.surroundTextByTag("msreadoutspan", t, (t=>o.StringUtilities.NONEMPTY_STRING_REGEX.test(t.textContent) && e.contentNodes.findIndex((e=>e === t)) >= 0), ((t,i)=>{
                    let n = e.contentNodes.findIndex((e=>e === t));
                    n >= 0 && e.contentNodes.splice(n, 1, ...i)
                }
                ), i)
                  , d = {
                    spans: a.value(),
                    readingUnit: e
                };
                return {
                    value: ()=>d,
                    release: ()=>{
                        a.release(),
                        d.readingUnit.contentNodes = d.readingUnit.contentNodes.filter((e=>{
                            const t = s.FeatureList.get()
                              , i = !(!t || !t.isMSNArticleAndSmartReadAloudEnabled());
                            return r.DomUtilties.isInDocument(e, i, e.ownerDocument)
                        }
                        ))
                    }
                }
            }
        }
        ,
        5450: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingNavigator = void 0,
            t.ReadingNavigator = class {
            }
        }
        ,
        4195: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingRangeManipulations = void 0;
            const n = i(3755)
              , o = i(9762)
              , s = i(8366);
            !function(e) {
                function t(e, i) {
                    var n = i;
                    if (e.endContainer.nodeType === Node.TEXT_NODE) {
                        let t = e.endContainer.textContent.length;
                        if (e.endOffset < t && !l(e.endContainer)) {
                            let i = Math.min(e.endOffset + n, t);
                            n -= i - e.endOffset,
                            e.setEnd(e.endContainer, i)
                        }
                    }
                    if (n > 0) {
                        let t = e.endContainer.nodeType === Node.ELEMENT_NODE ? e.endContainer.childNodes[e.endOffset - 1] : e.endContainer
                          , i = a(t.ownerDocument.body, t);
                        if (i && !l(i)) {
                            let t = Math.min(n, i.textContent.length);
                            n -= t,
                            e.setEnd(i, t)
                        }
                    }
                    var o = n < i;
                    return o && n > 0 && t(e, n),
                    o
                }
                function i(e, t) {
                    var n = t;
                    if (e.startContainer.nodeType === Node.TEXT_NODE && e.startOffset > 0 && !l(e.startContainer)) {
                        let t = Math.max(0, e.startOffset - n);
                        n -= e.startOffset - t,
                        e.setStart(e.startContainer, t)
                    }
                    if (n > 0) {
                        let t = e.startContainer.nodeType === Node.ELEMENT_NODE ? e.startContainer.childNodes[e.startOffset] : e.startContainer
                          , i = r(t.ownerDocument.body, t);
                        if (i && !l(i)) {
                            let t = i.textContent.length
                              , o = Math.max(0, t - n);
                            n -= t - o,
                            e.setStart(i, o)
                        }
                    }
                    var o = n < t;
                    return o && n > 0 && i(e, n),
                    o
                }
                function r(e, t) {
                    let i = t;
                    do {
                        i = n.ReadingNavigationUtils.shouldSkipNode(i) ? n.ReadingNavigationUtils.getPreviousSubtreeNode(e, i) : n.ReadingNavigationUtils.getPreviousReadingNode(e, i)
                    } while (i && (i.nodeType !== Node.TEXT_NODE || l(i)));
                    return i !== t ? i : null
                }
                function a(e, t) {
                    let i = t;
                    do {
                        i = n.ReadingNavigationUtils.shouldSkipNode(i) ? n.ReadingNavigationUtils.getNextSubtreeNode(e, i) : n.ReadingNavigationUtils.getNextReadingNode(e, i)
                    } while (i && (i.nodeType !== Node.TEXT_NODE || l(i)));
                    return i !== t ? i : null
                }
                function d(e, t) {
                    if (1 === e.length)
                        return 0 === e.item(0).top && 0 === e.item(0).bottom && 0 === e.item(0).left && 0 === e.item(0).right;
                    if (e.length > 1) {
                        let i = e.item(0)
                          , n = e.item(e.length - 1)
                          , o = i.top
                          , s = i.bottom
                          , r = n.top
                          , a = n.bottom
                          , d = i.right
                          , l = n.left
                          , u = i.height
                          , c = n.height;
                        if (u + c <= a - o || a - o <= 0)
                            return !0;
                        if (u + c > a - o && (o != r || s != a))
                            return t ? i.left < n.right && r > o || l > d : l < d
                    }
                    return !1
                }
                function l(e) {
                    var t = e.textContent;
                    return 0 === t.length || !o.StringUtilities.NONEMPTY_STRING_REGEX.test(t)
                }
                e.createRange = function(e, t, i, n) {
                    for (var o, r = e.contentNodes, a = e.textContents, d = r.length, l = t, u = 0; u < d && l >= a[u].length; )
                        l -= a[u].length,
                        u++;
                    var c = o = u;
                    if (c === d)
                        return null;
                    let h = r[c].length - l;
                    if (i > h) {
                        for (i -= h,
                        c++; c < d && i > r[c].length; )
                            i -= r[c].length,
                            c++;
                        if (c >= d)
                            return null
                    } else
                        i += l;
                    let g = r[0].ownerDocument;
                    if (s.DomUtilties.isInDocument(r[o], n, g) && s.DomUtilties.isInDocument(r[c], n, g)) {
                        let e = g.createRange();
                        return e.setStart(r[o], l),
                        e.setEnd(r[c], i),
                        e
                    }
                    return null
                }
                ,
                e.expandRangeEnd = t,
                e.expandRangeStart = i,
                e.expandToLineRange = function(e, n, o) {
                    let s = e.cloneRange();
                    return function(e, t, n) {
                        let o = e.startContainer
                          , s = e.startOffset;
                        [10, 1].forEach((r=>{
                            for (; i(e, r); ) {
                                var a = t(e);
                                if (0 === a.length || d(a, n))
                                    break;
                                o = e.startContainer,
                                s = e.startOffset
                            }
                            e.setStart(o, s)
                        }
                        ))
                    }(s, o, n),
                    function(e, i, n) {
                        let o = e.endContainer
                          , s = e.endOffset;
                        [10, 1].forEach((r=>{
                            for (; t(e, r); ) {
                                var a = i(e);
                                if (0 === a.length || d(a, n))
                                    break;
                                o = e.endContainer,
                                s = e.endOffset
                            }
                            e.setEnd(o, s)
                        }
                        ))
                    }(s, o, n),
                    s
                }
                ,
                e.getPreviousExpandableNode = r,
                e.getNextExpandableNode = a
            }(t.ReadingRangeManipulations || (t.ReadingRangeManipulations = {}))
        }
        ,
        1014: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingUnit = void 0,
            t.ReadingUnit = class {
                constructor(e, t) {
                    this._textStartOffset = e,
                    this._textEndOffset = t || null
                }
                get textStartOffset() {
                    return this._textStartOffset
                }
                set textStartOffset(e) {
                    this._textStartOffset = e
                }
                get textEndOffset() {
                    return this._textEndOffset
                }
                set textEndOffset(e) {
                    this._textEndOffset = e
                }
            }
        }
        ,
        949: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingUnitNavigator = void 0;
            const n = i(4912)
              , o = i(262)
              , s = i(2042)
              , r = i(6164)
              , a = i(3755);
            t.ReadingUnitNavigator = class {
                constructor() {
                    const e = n.FeatureList.get();
                    this._isMsnArticleAndReadSmartEnabled = !(!e || !e.isMSNArticleAndSmartReadAloudEnabled()),
                    this._currentUnit = null
                }
                setStartingNode(e, t) {
                    this._direction = r.UnitDirection.Next,
                    this._currentUnit = null,
                    this._rootNode = e ? e.ownerDocument.body : null,
                    this._currentUnitContainer = a.ReadingNavigationUtils.getUnitContainer(e),
                    this._currentNode = e;
                    let i = e;
                    for (; i && i !== this._currentUnitContainer && !a.ReadingNavigationUtils.isUnitContainer(i); )
                        this._currentNode = i,
                        i = i.previousSibling ? i.previousSibling : i.parentNode;
                    for (; this._currentNode && a.ReadingNavigationUtils.shouldSkipNode(this._currentNode); )
                        this._currentNode = a.ReadingNavigationUtils.getNextSubtreeNode(this._rootNode, this._currentNode);
                    e && this._currentNode && (e === this._currentNode || 0 != (e.compareDocumentPosition(this._currentNode) & Node.DOCUMENT_POSITION_PRECEDING)) && (this._textStartOffset = t || 0,
                    this._offsetNode = this._currentNode === e ? null : e)
                }
                setEndingNode(e, t=0) {
                    this._endNode = e,
                    this._textEndOffset = t
                }
                resetEndNode() {
                    this._endNode = null,
                    this._textEndOffset = null
                }
                setMSNArticleContentNode(e) {
                    this._msnArticleContentNode = e
                }
                setMSNArticleTitleNode(e) {
                    this._msnArticleTitleNode = e
                }
                getCurrentUnit() {
                    return this._currentUnit
                }
                moveByAUnit(e) {
                    let t, i = 0, n = !0;
                    if (e === r.UnitDirection.Current)
                        throw new Error("moveByAUnit should not be called with Direction as Current");
                    if (this._rootNode && this._currentUnitContainer)
                        for (this.adjustCurrentNodeForDirection(e),
                        t = []; this._currentNode; ) {
                            n && (n = this._offsetNode && 0 != (this._offsetNode.compareDocumentPosition(this._currentNode) & Node.DOCUMENT_POSITION_PRECEDING));
                            var d = !1;
                            if (e === r.UnitDirection.Next && this._currentNode === this._currentUnitContainer.nextSibling || e === r.UnitDirection.Previous && this._currentNode === this._currentUnitContainer.previousSibling)
                                this._currentUnitContainer = a.ReadingNavigationUtils.getUnitContainer(this._currentNode),
                                d = !0;
                            else
                                for ((this._currentNode.nodeType === Node.TEXT_NODE || o.HTMLReadingUnit.EmptyTagNodeList.includes(this._currentNode.nodeName.toUpperCase())) && (t.push(this._currentNode),
                                n && (i += this._currentNode.textContent.length)),
                                this._isMsnArticleAndReadSmartEnabled && this._currentNode !== this._msnArticleContentNode ? (this._currentNode = a.ReadingNavigationUtils.moveByANode(this._msnArticleTitleNode, this._currentNode, e),
                                this._currentNode || (this._rootNode = this._msnArticleContentNode,
                                this._currentNode = this._msnArticleContentNode)) : this._currentNode = a.ReadingNavigationUtils.moveByANode(this._rootNode, this._currentNode, e),
                                a.ReadingNavigationUtils.isUnitContainer(this._currentNode) && (this._currentUnitContainer = this._currentNode,
                                d = !0); this._currentNode && a.ReadingNavigationUtils.shouldSkipNode(this._currentNode); )
                                    this._currentNode = a.ReadingNavigationUtils.moveByASubtree(this._rootNode, this._currentNode, e),
                                    a.ReadingNavigationUtils.isUnitContainer(this._currentNode) && (this._currentUnitContainer = this._currentNode,
                                    d = !0);
                            if (d) {
                                if (!a.ReadingNavigationUtils.areEmptyOrWhiteSpaceTextNodes(t))
                                    break;
                                n = !1,
                                i = 0,
                                this._textStartOffset = 0,
                                this._offsetNode = null,
                                t = []
                            }
                        }
                    return t && t.length > 0 && e == r.UnitDirection.Previous && t.reverse(),
                    this._currentUnit = a.ReadingNavigationUtils.createReadingUnit(t, this._textStartOffset + i),
                    this.setEndOffsetInCurrentUnit(),
                    this._offsetNode = null,
                    this._textStartOffset = 0,
                    this._currentUnit ? s.UnitNavigationStatus.Success : s.UnitNavigationStatus.ContentEnded
                }
                resetReadingPosition() {
                    this.resetEndNode(),
                    this.setStartingNode(document.body),
                    this._currentUnit = null
                }
                setEndOffsetInCurrentUnit() {
                    if (this._endNode) {
                        let e = 0
                          , t = !1;
                        for (let i = 0; i < this._currentUnit.contentNodes.length; i++) {
                            let n = this._currentUnit.contentNodes[i];
                            if (this._endNode === n) {
                                e += this._textEndOffset,
                                t = !0;
                                break
                            }
                            if (0 != (n.compareDocumentPosition(this._endNode) & Node.DOCUMENT_POSITION_PRECEDING)) {
                                t = !0;
                                break
                            }
                            e += n.textContent.length
                        }
                        t && (this._currentUnit.textEndOffset = e,
                        this._endNode = null,
                        this._textEndOffset = 0)
                    }
                }
                adjustCurrentNodeForDirection(e) {
                    e !== r.UnitDirection.Current && this._direction !== e && (this._currentUnit && this._currentUnit.contentNodes && this._currentUnit.contentNodes.length > 0 ? (this._currentNode = e === r.UnitDirection.Next ? a.ReadingNavigationUtils.getNextReadingNode(this._rootNode, this._currentUnit.contentNodes[this._currentUnit.contentNodes.length - 1]) : a.ReadingNavigationUtils.getPreviousReadingNode(this._rootNode, this._currentUnit.contentNodes[this._currentUnit.contentNodes.length - 1]),
                    this._currentUnitContainer = a.ReadingNavigationUtils.getUnitContainer(this._currentNode)) : this._currentNode = this._rootNode,
                    this._direction = e)
                }
            }
        }
        ,
        8355: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadOutLoudEventHandlers = void 0;
            const n = i(8095);
            class o {
                constructor(e, t, i) {
                    this._releasables = [],
                    this._isInitialized = !1,
                    this._hostProxy = e,
                    this._mainViewModel = t,
                    this._previousReadingState = n.ReadingState.Stopped,
                    this._currentFrame = null,
                    this._pendingContext = null,
                    this._speechPreferences = null,
                    this._enableOnlineVoiceFre = !1,
                    i && window.addEventListener("focus", (()=>{
                        this._hostProxy.sendReadOutLoudFocusReceived(this._currentFrame)
                    }
                    )),
                    window.addEventListener("beforeunload", (()=>{
                        if (this._settingsViewModel && this._readOutLoudViewModel) {
                            let e = this._readOutLoudViewModel.getReadingState();
                            e !== n.ReadingState.Playing && e !== n.ReadingState.Paused || (window.self === window.top ? (this._readOutLoudViewModel.stopReading(),
                            this.sendReadOutLoudStatus(n.ReadingState.Stopped, !0)) : (this._readOutLoudViewModel.pauseReading(!1),
                            this.sendReadOutLoudStatus(n.ReadingState.Paused, !0)))
                        }
                    }
                    )),
                    this.registerHostEventHandlers()
                }
                reset() {
                    this._releasables.forEach((e=>{
                        e.release()
                    }
                    )),
                    this._releasables = [],
                    this._readOutLoudViewModel = null,
                    this._settingsViewModel = null,
                    this._isInitialized = !1,
                    this._pendingContext = null
                }
                initialize(e) {
                    if (this._mainViewModel.initializeReadOutLoud(e, this._enableOnlineVoiceFre),
                    this._readOutLoudViewModel = this._mainViewModel.getReadOutLoudViewModel(),
                    this._settingsViewModel = this._mainViewModel.getReadOutLoudSettingsViewModel(),
                    this._readOutLoudViewModel && this._settingsViewModel) {
                        let e = ()=>{
                            let e = this._settingsViewModel.getVoice()
                              , t = this._settingsViewModel.getDropDownOptionsForVoices();
                            e && t && this._hostProxy.sendSpeechSettings(this._settingsViewModel.getReadingRate(), e.name, t)
                        }
                          , t = e=>{
                            this._readOutLoudViewModel.getReadingState() !== n.ReadingState.Uninitialized && this._hostProxy.sendSpeechPreferences(e)
                        }
                        ;
                        this._releasables.push(this._settingsViewModel.rateChanged().subscribe((()=>{
                            e()
                        }
                        ))),
                        this._releasables.push(this._settingsViewModel.voiceChanged().subscribe((()=>{
                            e()
                        }
                        ))),
                        this._releasables.push(this._settingsViewModel.voicesChanged().subscribe((()=>{
                            e()
                        }
                        ))),
                        this._releasables.push(this._settingsViewModel.speechPreferencesChanged().subscribe((e=>{
                            this._speechPreferences = e,
                            t(e)
                        }
                        ))),
                        this._releasables.push(this._settingsViewModel.compatibleVoiceAvailableChanged().subscribe((()=>{
                            this.sendReadOutLoudStatus(this._readOutLoudViewModel.getReadingState(), this._settingsViewModel.getCompatibleVoiceAvailable(), this._readOutLoudViewModel.getWordRect())
                        }
                        ))),
                        this._releasables.push(this._readOutLoudViewModel.readingStateChanged().subscribe((()=>{
                            this.sendReadOutLoudStatus(this._readOutLoudViewModel.getReadingState(), this._settingsViewModel.getCompatibleVoiceAvailable(), this._readOutLoudViewModel.getWordRect())
                        }
                        )))
                    }
                    this._isInitialized = !0
                }
                registerHostEventHandlers() {
                    this._hostProxy.readOutLoudInitializeSettingsRequested().subscribe((e=>{
                        5 == e.length && (e[3] && (this._speechPreferences = e[3]),
                        this._enableOnlineVoiceFre = "true" === e[4],
                        this._currentFrame = {
                            frameTreeNodeId: Number(e[1]),
                            processId: Number(e[2])
                        })
                    }
                    )),
                    this._hostProxy.readOutLoudFocusChanged().subscribe((()=>{
                        if (this._isInitialized) {
                            let e = this._readOutLoudViewModel.getReadingState();
                            this._pendingContext ? this._hostProxy.sendContextToFocusedFrame(this._pendingContext) : this._hostProxy.sendContextToFocusedFrame({
                                readingState: e,
                                speechPreferences: this._settingsViewModel ? this._settingsViewModel.getSpeechPreferences() : null,
                                dwellTime: this._readOutLoudViewModel.getPausedDwellTime()
                            }),
                            this._readOutLoudViewModel.pauseReading(!0)
                        } else
                            this._hostProxy.sendContextToFocusedFrame({
                                readingState: n.ReadingState.Stopped,
                                speechPreferences: null,
                                dwellTime: 0
                            })
                    }
                    )),
                    this._hostProxy.readOutLoudOnContextFromFrame().subscribe((e=>{
                        this._isInitialized || this.initialize(JSON.stringify(e.speechPreferences)),
                        this._readOutLoudViewModel.setDwellTime(e.dwellTime),
                        e.readingState === n.ReadingState.Playing ? this.handleStartReadOutLoud() : e.readingState === n.ReadingState.Paused && this._readOutLoudViewModel.pauseReading(!0)
                    }
                    )),
                    this._hostProxy.readOutLoudSpeechPrefChanged().subscribe((e=>{
                        this._speechPreferences = e,
                        this._isInitialized && this._settingsViewModel.updateSpeechSettings(this._speechPreferences)
                    }
                    )),
                    this._hostProxy.readOutLoudStartRequested().subscribe((e=>{
                        this._isInitialized || (this._hostProxy.sendReadOutLoudStatus(this._currentFrame, n.ReadingState.InteractionsDisabled, !0),
                        this.initialize(this._speechPreferences)),
                        this.handleStartReadOutLoud(e)
                    }
                    )),
                    this._hostProxy.readOutLoudStopRequested().subscribe((()=>{
                        this._isInitialized && (this._settingsViewModel.logVoiceChangeTelemetry(this._readOutLoudViewModel.getContentType()),
                        this._settingsViewModel.logRateChangeTelemetry(this._readOutLoudViewModel.getContentType()),
                        this._readOutLoudViewModel.logSpeechSynthesisInvokeTelemetry(),
                        this._readOutLoudViewModel.stopReading())
                    }
                    )),
                    this._hostProxy.readOutLoudPauseRequested().subscribe((()=>{
                        this._isInitialized || this.initialize(this._speechPreferences),
                        this._readOutLoudViewModel.logSpeechSynthesisInvokeTelemetry(),
                        this._pendingContext = {
                            readingState: n.ReadingState.Paused,
                            speechPreferences: this._settingsViewModel.getSpeechPreferences(),
                            dwellTime: this._readOutLoudViewModel.getPausedDwellTime()
                        },
                        this._readOutLoudViewModel.pauseReading(!1)
                    }
                    )),
                    this._hostProxy.readOutLoudNextRequested().subscribe((()=>{
                        this._isInitialized && this._readOutLoudViewModel.moveToNextUnit()
                    }
                    )),
                    this._hostProxy.readOutLoudPreviousRequested().subscribe((()=>{
                        this._isInitialized && this._readOutLoudViewModel.moveToPreviousUnit()
                    }
                    )),
                    this._hostProxy.readOutLoudPreloadRequested().subscribe((e=>{
                        this._isInitialized && this._readOutLoudViewModel.preloadTheRestUtterances(e[0], 1 === e[1])
                    }
                    )),
                    this._hostProxy.readOutLoudChangeRateRequested().subscribe((e=>{
                        this._isInitialized && this._settingsViewModel.setReadingRate(e)
                    }
                    )),
                    this._hostProxy.readOutLoudChangeVoiceRequested().subscribe((e=>{
                        this._isInitialized && this._settingsViewModel.setCurrentVoiceFromURI(e)
                    }
                    ))
                }
                sendReadOutLoudStatus(e, t, i) {
                    e !== n.ReadingState.Uninitialized && (this._pendingContext && (this._pendingContext = null),
                    this._hostProxy.sendReadOutLoudStatus(this._currentFrame, e, t, i),
                    e !== this._previousReadingState && e === n.ReadingState.Stopped && this.reset(),
                    this._previousReadingState = e)
                }
                handleStartReadOutLoud(e=o.defaultStartParams) {
                    this._pendingContext = {
                        readingState: n.ReadingState.Playing,
                        speechPreferences: this._settingsViewModel ? this._settingsViewModel.getSpeechPreferences() : null,
                        dwellTime: this._readOutLoudViewModel.getPausedDwellTime()
                    },
                    this._readOutLoudViewModel.startReading(e)
                }
            }
            o.defaultStartParams = {
                startRequestTime: 0,
                startType: n.StartType.Default,
                startPosition: {
                    x: 0,
                    y: 0
                },
                needsTransformOfStartPosition: !1
            },
            t.ReadOutLoudEventHandlers = o
        }
        ,
        3755: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingNavigationUtils = void 0;
            const n = i(262)
              , o = i(6164)
              , s = i(9762);
            class r {
                static getNextReadingNode(e, t) {
                    return t.hasChildNodes() ? t.firstChild : r.getNextSubtreeNode(e, t)
                }
                static getPreviousReadingNode(e, t) {
                    return t.hasChildNodes() ? t.lastChild : r.getPreviousSubtreeNode(e, t)
                }
                static shouldSkipNode(e) {
                    if (!e)
                        return !0;
                    if (e.nodeType === Node.ELEMENT_NODE) {
                        if (n.HTMLReadingUnit.EmptyTagNodeList.includes(e.nodeName.toUpperCase()))
                            return !1;
                        if (!s.StringUtilities.NONEMPTY_STRING_REGEX.test(e.textContent))
                            return !0;
                        if (r.NodeIgnoreList.indexOf(e.nodeName.toUpperCase()) > -1)
                            return !0;
                        let t = window.getComputedStyle(e);
                        if ("none" === t.display.toLowerCase() || "hidden" === t.visibility.toLowerCase() || e.hidden)
                            return !0;
                        if (parseInt(t.width) <= 5 && ("hidden" === t.overflow.toLowerCase() || "hidden" === t.overflowX.toLowerCase()))
                            return !0;
                        if (parseInt(t.height) <= 5 && ("hidden" === t.overflow.toLowerCase() || "hidden" === t.overflowY.toLowerCase()))
                            return !0;
                        if ("inline" !== t.display.toLowerCase() && e.scrollWidth > e.offsetWidth && "hidden" === t.overflow.toLowerCase())
                            return !0;
                        if (e.hasAttribute("aria-hidden") && "true" === e.getAttribute("aria-hidden"))
                            return !0
                    }
                    return !1
                }
                static getPreviousSubtreeNode(e, t) {
                    for (; t && t !== e && !t.previousSibling; )
                        t = t.parentNode;
                    return t && t !== e ? t.previousSibling : null
                }
                static getNextSubtreeNode(e, t) {
                    for (; t && t !== e && !t.nextSibling; )
                        t = t.parentNode;
                    return t && t !== e ? t.nextSibling : null
                }
                static createReadingUnit(e, t) {
                    return e && e.length > 0 && !r.areEmptyOrWhiteSpaceTextNodes(e) ? new n.HTMLReadingUnit(e,t) : null
                }
                static areEmptyOrWhiteSpaceTextNodes(e) {
                    return 0 === e.length || !e.some((e=>s.StringUtilities.NONEMPTY_STRING_REGEX.test(e.textContent)))
                }
                static moveByANode(e, t, i) {
                    return i === o.UnitDirection.Next ? r.getNextReadingNode(e, t) : r.getPreviousReadingNode(e, t)
                }
                static moveByASubtree(e, t, i) {
                    return i === o.UnitDirection.Next ? r.getNextSubtreeNode(e, t) : r.getPreviousSubtreeNode(e, t)
                }
                static getUnitContainer(e) {
                    for (; e && !r.isUnitContainer(e); )
                        e = e.parentNode;
                    return e
                }
                static isUnitContainer(e) {
                    if (e && e.nodeType === Node.ELEMENT_NODE) {
                        const t = e.tagName.toLowerCase();
                        return r.unitBoundaryTags.indexOf(t) > -1
                    }
                    return !1
                }
                static findFirsth1Tag(e) {
                    const t = e.getElementsByTagName("h1");
                    return 0 !== t.length ? t[0] : null
                }
                static getTextNodes(e) {
                    let t = [];
                    const i = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, {
                        acceptNode: e=>this.shouldSkipNode(e) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
                    });
                    for (; i.nextNode(); )
                        t.push(i.currentNode);
                    return t
                }
            }
            r.NodeIgnoreList = ["NOSCRIPT", "SCRIPT", "STYLE", "SELECT"],
            r.unitBoundaryTags = ["body", "div", "p", "address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4", "h5", "h6", "nav", "section", "main", "figcaption", "ul", "ol", "dl", "li", "dt", "dd", "pre", "td", "th", "caption", "summary", "details", "button", "legend", "label", "textarea"],
            t.ReadingNavigationUtils = r
        }
        ,
        913: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.SmartReadAloudUtils = t.SmartReadParseError = void 0;
            const n = i(4349)
              , o = i(2554);
            var s;
            !function(e) {
                e.ContentPaywalled = "ContentPaywalled",
                e.ContentInvalid = "ContentInvalid",
                e.ContentFetchTimeout = "ContentFetchTimeout"
            }(s = t.SmartReadParseError || (t.SmartReadParseError = {}));
            class r {
                static parseSdPrimaryContent(e, t, i) {
                    if (e) {
                        try {
                            let o = n.JsonUtilities.parseJsonOrNull(e);
                            return r.validatePrimaryContent(o) ? o.paywall ? void i(new Error(s.ContentPaywalled)) : void t(o.primaryContent) : void i(new Error(s.ContentInvalid))
                        } catch (e) {}
                        i(new Error(s.ContentInvalid))
                    } else
                        i(new Error(s.ContentInvalid))
                }
                static getSmartReadStatusFromError(e) {
                    return e.message === s.ContentFetchTimeout ? o.SmartReadStatus.ContentFetchTimedOut : e.message === s.ContentInvalid ? o.SmartReadStatus.InvalidResponse : e.message === s.ContentPaywalled ? o.SmartReadStatus.ContentEmptyPaywalled : null
                }
                static validatePrimaryContent(e) {
                    return e && e.hasOwnProperty("primaryContent") && Array.isArray(e.primaryContent) && e.primaryContent.every((e=>"string" == typeof e))
                }
            }
            t.SmartReadAloudUtils = r
        }
        ,
        8039: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadOutLoudSettingsViewModel = void 0;
            const n = i(864)
              , o = i(2554)
              , s = i(4349)
              , r = i(4912);
            class a {
                constructor(e, t, i) {
                    this._telemetryClient = i,
                    this._currentVoices = [],
                    this._currentVoicesDropDownOptions = null,
                    this._speechPreferences = s.JsonUtilities.parseJsonOrNull(e, "ReadOutLoud", o.ReadAloudErrors[o.ReadAloudErrors.JSONParsing_ReadOutLoudSpeechPreferences], this._telemetryClient),
                    this._currentReadingRate = 1,
                    this._currentVoice = null,
                    this._compatibleVoiceAvailable = !0,
                    this._voicesChanged = new n.EventSource,
                    this._enableOnlineVoiceFre = t,
                    this._rateChanged = new n.EventSource,
                    this._voiceChanged = new n.EventSource,
                    this._compatibleVoiceAvailableChanged = new n.EventSource,
                    this._speechPreferencesChanged = new n.EventSource,
                    this._defaultVoiceExperimentVoiceForLanguage = ["Microsoft Neerja Online (Natural) - English (India)", "Microsoft Neerja Online (Natural) - English (India) (Preview)"],
                    this._preferredDefaultVoiceForLanguage = new Map([["en", "Microsoft Aria Online (Natural) - English (United States)"], ["zh", "Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)"]]),
                    this._noOfTimesVoiceChanged = 0,
                    this._noOfTimesRateChanged = 0;
                    const a = r.FeatureList.get();
                    this._readAloudDefaultVoice = a && a.readAloudDefaultVoice() ? a.readAloudDefaultVoice() : 0,
                    this._hasDefaultVoiceBeingChanged = !(!a || !a.hasReadAloudDefaultVoiceChanged()) && a.hasReadAloudDefaultVoiceChanged(),
                    this._browserlocale = window.navigator.language,
                    this.setSpeechSynthesis(window.speechSynthesis)
                }
                setSpeechSynthesis(e) {
                    this._speechSynthesis = e,
                    this._currentVoices = this._speechSynthesis.getVoices(),
                    this._speechSynthesis.onvoiceschanged = ()=>{
                        this.isVoicesAvailable() && this._currentVoice && (this._currentVoices.find((e=>e.voiceURI === this._currentVoice.voiceURI)) || (this._hasDefaultVoiceBeingChanged = !0,
                        this.updateCurrentVoice(this._language)))
                    }
                }
                getSpeechSynthesis() {
                    return this._speechSynthesis
                }
                getSpeechPreferences() {
                    return this._speechPreferences
                }
                updateSpeechSettings(e) {
                    if (this._speechPreferences = s.JsonUtilities.parseJsonOrNull(e, "ReadOutLoud", o.ReadAloudErrors[o.ReadAloudErrors.JSONParsing_ReadOutLoudSpeechPreferences], this._telemetryClient),
                    this._speechPreferences && this._speechPreferences.languageSettings && this._speechPreferences.languageSettings.length > 0) {
                        let e = this._speechPreferences.languageSettings.find((e=>e.language.toUpperCase().startsWith(this._language.toUpperCase())));
                        if (e) {
                            if (this._currentVoice.voiceURI.toUpperCase() != e.voiceURI.toUpperCase()) {
                                let t = this._currentVoices.find((t=>t.voiceURI.toUpperCase() === e.voiceURI.toUpperCase()));
                                t && (this._currentVoice = t,
                                this._voiceChanged.trigger(void 0))
                            }
                            this._currentReadingRate != e.rate && e.rate >= .5 && e.rate <= 2 && (this._currentReadingRate = e.rate,
                            this._rateChanged.trigger(void 0))
                        }
                    }
                }
                setReadingRate(e) {
                    this._currentReadingRate !== e && (this._currentReadingRate = e,
                    this._rateChanged.trigger(void 0),
                    this._noOfTimesRateChanged += 1,
                    this.updateSpeechPreferences())
                }
                getReadingRate() {
                    return this._currentReadingRate
                }
                setCurrentVoiceFromURI(e) {
                    var t = this._currentVoices.find((t=>t.voiceURI === e));
                    t && this._currentVoice !== t && (this._noOfTimesVoiceChanged += 1,
                    this._currentVoice = t,
                    this._voiceChanged.trigger(void 0),
                    this.updateSpeechPreferences())
                }
                getVoice() {
                    return this._currentVoice
                }
                getDropDownOptionsForVoices() {
                    return this._currentVoicesDropDownOptions
                }
                setCompatibleVoiceAvailable(e) {
                    this._compatibleVoiceAvailable = e,
                    this._compatibleVoiceAvailableChanged.trigger(void 0)
                }
                getCompatibleVoiceAvailable() {
                    return this._compatibleVoiceAvailable
                }
                voiceChanged() {
                    return this._voiceChanged
                }
                rateChanged() {
                    return this._rateChanged
                }
                compatibleVoiceAvailableChanged() {
                    return this._compatibleVoiceAvailableChanged
                }
                voicesChanged() {
                    return this._voicesChanged
                }
                speechPreferencesChanged() {
                    return this._speechPreferencesChanged
                }
                isOnlineVoiceAvailable() {
                    return this._enableOnlineVoiceFre && null != this._currentVoices.find((e=>!1 === e.localService && e.lang.toUpperCase().startsWith(this._currentVoice.lang.toUpperCase())))
                }
                ensureSpeechSettingsInitializedAsync(e) {
                    return new Promise((t=>{
                        if (this._language = e.split("-")[0],
                        this._currentVoice)
                            return t(!0);
                        this.refreshVoicesListAsync().then((e=>(e ? e = this.updateCurrentVoice(this._language) : (this._telemetryClient.reportReadOutLoudInternalError(o.ReadAloudErrors.NoLanguagePackageInstalled),
                        this._compatibleVoiceAvailableChanged.trigger(void 0)),
                        this.isOnlineVoiceAvailable() || this._telemetryClient.reportReadOutLoudInternalError(o.ReadAloudErrors.NoOnlineVoicesAvailable),
                        t(e))))
                    }
                    ))
                }
                logVoiceChangeTelemetry(e) {
                    this._noOfTimesVoiceChanged && this._telemetryClient.reportReadOutLoudVoiceChange(e, this._noOfTimesVoiceChanged)
                }
                logRateChangeTelemetry(e) {
                    this._noOfTimesRateChanged && this._telemetryClient.reportReadOutLoudRateChange(e, this._noOfTimesRateChanged)
                }
                setSpeechSettingsForLanguage(e) {
                    var t = null
                      , i = null;
                    if (this._speechPreferences && this._speechPreferences.languageSettings && this._speechPreferences.languageSettings.length > 0) {
                        let n = this._speechPreferences.languageSettings.findIndex((t=>-1 != t.language.toUpperCase().indexOf(e.toUpperCase())));
                        if (-1 != n) {
                            let o = this._speechPreferences.languageSettings[n];
                            if (this._enableOnlineVoiceFre && (!o.version || o.version < 1) && this.setOnlineVoiceAsDefault(e))
                                return !0;
                            t || (t = this._currentVoices.find((e=>e.voiceURI.toUpperCase() === o.voiceURI.toUpperCase())),
                            i = o.rate >= .5 && o.rate <= 2 ? o.rate : 1,
                            this._speechPreferences.languageSettings.splice(n, 1),
                            this._speechPreferences.languageSettings.unshift(o),
                            this._speechPreferencesChanged.trigger(JSON.stringify(this._speechPreferences)))
                        }
                    }
                    if (!t) {
                        if (this._enableOnlineVoiceFre && this.setOnlineVoiceAsDefault(e))
                            return !0;
                        let n = this._currentVoices.filter((t=>0 === t.lang.toUpperCase().indexOf(e.toUpperCase())));
                        if (n.length > 0) {
                            if (!(t = n.find((e=>e.lang.toUpperCase() === this._browserlocale.toUpperCase())))) {
                                let i = this._preferredDefaultVoiceForLanguage.get(e);
                                i && (t = n.find((e=>e.voiceURI === i))),
                                t || (t = n[0])
                            }
                            i = 1
                        }
                    }
                    if (t && i) {
                        let n = this.getVoiceForExperiment();
                        return this._currentVoice = "en" == e && this._readAloudDefaultVoice && !this._hasDefaultVoiceBeingChanged && n ? n : t,
                        this._voiceChanged.trigger(void 0),
                        this._currentReadingRate = i,
                        this._rateChanged.trigger(void 0),
                        !0
                    }
                    return !1
                }
                setOnlineVoiceAsDefault(e) {
                    let t = this._currentVoices.filter((e=>!1 === e.localService && e.lang.toUpperCase().startsWith(this._language.toUpperCase())))
                      , i = null;
                    if (t.length > 0 && (i = t.find((e=>e.lang.toUpperCase() === this._browserlocale.toUpperCase())),
                    !i)) {
                        let n = this._preferredDefaultVoiceForLanguage.get(e);
                        n && (i = t.find((e=>e.voiceURI === n))),
                        i || (i = t[0])
                    }
                    if (i) {
                        let t = this.getVoiceForExperiment();
                        return this._currentVoice = "en" == e && this._readAloudDefaultVoice && !this._hasDefaultVoiceBeingChanged && t ? t : i,
                        this._voiceChanged.trigger(void 0),
                        this._currentReadingRate = 1,
                        this._rateChanged.trigger(void 0),
                        this.updateSpeechPreferences(!0),
                        !0
                    }
                    return !1
                }
                updateCurrentVoice(e) {
                    return this._compatibleVoiceAvailable = !0,
                    this.setSpeechSettingsForLanguage(e) || (this._currentVoice = this._currentVoices[0],
                    this._voiceChanged.trigger(void 0),
                    this._telemetryClient.reportReadOutLoudInternalError(o.ReadAloudErrors.LanguagePackageNotFound),
                    this._compatibleVoiceAvailable = !1),
                    this._compatibleVoiceAvailableChanged.trigger(void 0),
                    this._compatibleVoiceAvailable
                }
                updateSpeechPreferences(e=!1) {
                    if (this._language && this._language.length <= a.MaxLanguageLength) {
                        if (this._speechPreferences && this._speechPreferences.languageSettings && this._speechPreferences.languageSettings.length > 0) {
                            var t = this._speechPreferences.languageSettings.findIndex((e=>e.language.toUpperCase() === this._language.toUpperCase()));
                            let i = this._enableOnlineVoiceFre ? 0 : 1;
                            -1 != t && (i = this._speechPreferences.languageSettings[t].version,
                            this._speechPreferences.languageSettings.splice(t, 1));
                            let n = {
                                language: this._language,
                                voiceURI: this._currentVoice.voiceURI,
                                rate: this._currentReadingRate,
                                version: e ? 1 : i
                            };
                            this._speechPreferences.languageSettings.unshift(n),
                            this._speechPreferences.languageSettings.length > 15 && (this._speechPreferences.languageSettings.length = 15)
                        } else
                            this._speechPreferences = {
                                languageSettings: [{
                                    language: this._language,
                                    voiceURI: this._currentVoice.voiceURI,
                                    rate: this._currentReadingRate,
                                    version: this._enableOnlineVoiceFre && e ? 1 : 0
                                }]
                            };
                        this._speechPreferencesChanged.trigger(JSON.stringify(this._speechPreferences))
                    }
                }
                refreshVoicesListAsync() {
                    return new Promise((e=>{
                        if (this.isVoicesAvailable())
                            return e(!0);
                        let t, i = this._voicesChanged.subscribe((()=>(clearTimeout(t),
                        i && i.release(),
                        e(!0))));
                        t = window.setTimeout((()=>(this._telemetryClient.reportReadOutLoudInternalError(o.ReadAloudErrors.NoVoicesAvailable),
                        i.release(),
                        e(this.isVoicesAvailable()))), 2e3)
                    }
                    ))
                }
                getVoiceForExperiment() {
                    switch (this._readAloudDefaultVoice) {
                    case 1:
                        return this._currentVoices.find((e=>e.voiceURI == this._defaultVoiceExperimentVoiceForLanguage[0]));
                    case 2:
                        return this._currentVoices.find((e=>e.voiceURI == this._defaultVoiceExperimentVoiceForLanguage[1]));
                    default:
                        return null
                    }
                    return null
                }
                isVoicesAvailable() {
                    return this._currentVoices = this._speechSynthesis.getVoices(),
                    !!(this._currentVoices && this._currentVoices.length > 0) && (this._currentVoicesDropDownOptions = this._currentVoices.map((e=>({
                        uri: e.voiceURI,
                        name: e.name,
                        lang: e.lang
                    }))),
                    this._voicesChanged.trigger(void 0),
                    !0)
                }
            }
            a.MaxLanguageLength = 85,
            t.ReadOutLoudSettingsViewModel = a
        }
        ,
        8095: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadOutLoudViewModel = t.maxUtteranceLength = t.seekToStartTimeout = t.StartType = t.ReadingState = void 0;
            const n = i(2554)
              , o = i(6164)
              , s = i(9612)
              , r = i(9762)
              , a = i(562)
              , d = i(4912);
            var l, u;
            !function(e) {
                e[e.InEligible = 0] = "InEligible",
                e[e.Playing = 1] = "Playing",
                e[e.Paused = 2] = "Paused",
                e[e.Stopped = 3] = "Stopped",
                e[e.PlayDisabled = 4] = "PlayDisabled",
                e[e.InteractionsDisabled = 5] = "InteractionsDisabled",
                e[e.Uninitialized = 6] = "Uninitialized"
            }(l = t.ReadingState || (t.ReadingState = {})),
            function(e) {
                e[e.Default = 0] = "Default",
                e[e.ReadFromPoint = 1] = "ReadFromPoint",
                e[e.ReadFromWordSelection = 2] = "ReadFromWordSelection",
                e[e.ReadSelection = 3] = "ReadSelection",
                e[e.ResumeFromSelection = 4] = "ResumeFromSelection",
                e[e.ReadFromFirstVisibleElement = 5] = "ReadFromFirstVisibleElement",
                e[e.ReadFromCurrentPage = 6] = "ReadFromCurrentPage"
            }(u = t.StartType || (t.StartType = {}));
            const c = "en-US";
            t.seekToStartTimeout = 5e3,
            t.maxUtteranceLength = 1e3;
            class h {
                constructor(e, t, i, n, s) {
                    this._readingNavigator = e,
                    this._highlighter = t,
                    this._contentProvider = s,
                    this._delimiters = null,
                    this._speechUtterances = [],
                    this._seekToStartForCurrentUnit = !0,
                    this._isProcessingPending = !1,
                    this._telemetryClient = n,
                    this._continueReadingOnUserActionComplete = !1,
                    this._ignoreUserActionEvents = !1,
                    this._startRequestTime = 0,
                    this._dwellTimeStart = 0,
                    this._dwellTimeDuration = 0,
                    this._shouldExitAfterReadingCurrentUnit = !1,
                    this._characterCount = 0,
                    this._noOfTimesSpeechSynthesisInvoked = 0,
                    this._continueClickCountAfterROLStarted = 0,
                    window.addEventListener("beforeunload", (()=>{
                        this.commitDwellTime()
                    }
                    )),
                    i && (this._settings = i,
                    this._settings.voiceChanged().subscribe((()=>{
                        this.getReadingState() === l.Playing && (this.cancelReading(!1),
                        this.continueReading(o.UnitDirection.Current, h.defaultStartParams));
                        let e = this._settings.getVoice();
                        (!1 === e.localService && !this._isOnlineVoicePlaying || !0 === e.localService && this._isOnlineVoicePlaying) && (this.commitCharacterCount(),
                        this._logVoiceUsageTelemetry = !0)
                    }
                    )),
                    this._settings.rateChanged().subscribe((()=>{
                        this._eventTimeoutReleasable && (this._eventTimeoutReleasable.release(),
                        this._eventTimeoutReleasable = null);
                        const e = this.getReadingState();
                        let t = window.setTimeout((()=>{
                            e === l.Playing && (this.cancelReading(!1),
                            this.continueReading(o.UnitDirection.Current, h.defaultStartParams)),
                            this._eventTimeoutReleasable = null
                        }
                        ), 550);
                        this._eventTimeoutReleasable = {
                            release: ()=>clearTimeout(t)
                        }
                    }
                    )))
                }
                preloadTheRestUtterances(e, t) {
                    let i = this._speechSynthesis;
                    if (!i.preload || !this._readingNavigator.deepCopy)
                        return;
                    let n = [];
                    const o = this._readingNavigator.deepCopy();
                    let s = ()=>{
                        o.moveToNextUnitAsync().then((t=>{
                            let r = o.getCurrentUnit();
                            if (!t || null === r)
                                return void i.preload(e, n);
                            let a = this.createSpeechUtterances(r, !0);
                            n = n.concat(a),
                            s()
                        }
                        ))
                    }
                    ;
                    if (t) {
                        let e = ()=>{
                            o.moveToPreviousUnitAsync().then((t=>{
                                let i = o.getCurrentUnit();
                                t && null !== i ? e() : s()
                            }
                            ))
                        }
                        ;
                        e()
                    } else
                        s()
                }
                startReading(e=h.defaultStartParams) {
                    this._startRequestTime = e.startRequestTime,
                    this.ensureSpeechSynthesis();
                    let t = this._speechUtterances.length
                      , i = this.getReadingState();
                    if (this._isProcessingPending || t > 0 && i !== l.Paused)
                        return void this._telemetryClient.reportReadOutLoudStartStates(n.ReadAloudStartStates.ReadAloud_StartReadingIgnored);
                    this._isProcessingPending = !0;
                    let r = i === l.Paused && this.isReadingPositionValid() && null !== this._readingNavigator.getCurrentUnit() && !(this._contentProvider.getContentType() === a.ContentType.PDF && e.startType === u.ResumeFromSelection)
                      , c = !r && i === l.Paused;
                    this.getLanguageAsync().then((t=>{
                        if (this._isProcessingPending) {
                            if (this._isProcessingPending = !1,
                            this.ensureDelimiters(t),
                            r)
                                return this.ensureNavigationEventListeners(),
                                void this.resumeReading();
                            i === l.Paused && this._readingNavigator.getCurrentUnit() && (this.resetReadSelection(),
                            d.FeatureList.get() && d.FeatureList.get().isReadAloudSDExtractionEnabled() || (e.startType = this._contentProvider.getContentType() !== a.ContentType.ReadingView && this._contentProvider.getContentType() !== a.ContentType.PDF || e.startType === u.ResumeFromSelection ? u.ReadFromWordSelection : u.ReadFromFirstVisibleElement)),
                            (i === l.Stopped || i === l.Uninitialized || c) && (this._isProcessingPending = !0,
                            this._settings.ensureSpeechSettingsInitializedAsync(t).then((t=>{
                                this._isProcessingPending && (this._isProcessingPending = !1,
                                t ? (c && (this.cancelReading(!0),
                                this._highlighter.deactivateDecoration(s.DecorationType.Word)),
                                this.ensureNavigationEventListeners(),
                                this.continueReading(o.UnitDirection.Next, e, !0)) : this.pauseReading())
                            }
                            )))
                        }
                    }
                    ))
                }
                pauseReading(e=!1) {
                    this.getReadingState() !== l.Paused ? (this._speechSynthesis && this.cancelReading(!1, l.Paused),
                    this.logSuccessTelemetry(l[l.Paused]),
                    this._highlighter.deactivateDecoration(e ? s.DecorationType.All : s.DecorationType.ExceptWord),
                    this.handleSetReadingState(l.Paused)) : this.getReadingState() === l.Paused && e && this._highlighter.deactivateDecoration(s.DecorationType.All)
                }
                stopReading() {
                    this.cancelReading(!0, l.Stopped),
                    this._userActionStartedListenerReleasable && (this._userActionStartedListenerReleasable.release(),
                    this._userActionStartedListenerReleasable = null),
                    this._userActionCompletedListenerReleasable && (this._userActionCompletedListenerReleasable.release(),
                    this._userActionCompletedListenerReleasable = null)
                }
                moveToPreviousUnit() {
                    if (this.resetReadSelection(),
                    this.getReadingState() === l.Playing) {
                        this.cancelReading(!1),
                        this._readingNavigator.setCurrentUnitTextOffset(0),
                        this.continueReading(this._seekToStartForCurrentUnit ? o.UnitDirection.Current : o.UnitDirection.Previous, h.defaultStartParams),
                        this._seekToStartForCurrentUnit = !1;
                        let e = window.setTimeout((()=>{
                            this._seekToStartForCurrentUnit = !0,
                            this._seekToStartReleasableTimer = null
                        }
                        ), t.seekToStartTimeout);
                        this._seekToStartReleasableTimer = {
                            release: ()=>{
                                window.clearTimeout(e)
                            }
                        }
                    }
                }
                moveToNextUnit() {
                    this.resetReadSelection(),
                    this.getReadingState() === l.Playing && (this.cancelReading(!1),
                    this.continueReading(o.UnitDirection.Next, h.defaultStartParams))
                }
                getWordRect() {
                    return this._highlighter.getWordRect()
                }
                settingsViewModel() {
                    return this._settings
                }
                setDwellTime(e) {
                    this._dwellTimeDuration = e
                }
                getPausedDwellTime() {
                    return this.pauseDwellTime(),
                    this._dwellTimeDuration
                }
                getContentType() {
                    return this._contentProvider.getContentType()
                }
                logSpeechSynthesisInvokeTelemetry() {
                    0 !== this._noOfTimesSpeechSynthesisInvoked && (this._telemetryClient.reportReadOutLoudSpeechSynthesisInvoke(this._noOfTimesSpeechSynthesisInvoked),
                    this._noOfTimesSpeechSynthesisInvoked = 0)
                }
                resetReadSelection() {
                    this._shouldExitAfterReadingCurrentUnit = !1,
                    this._readingNavigator.getCurrentUnit() && this._readingNavigator.resetCurrentUnitEndOffset()
                }
                continueReading(e, t, i) {
                    this._isProcessingPending || (this._isProcessingPending = !0,
                    (i ? this._readingNavigator.initializeAsync(t) : Promise.resolve(!0)).then((t=>{
                        if (!t || !this._isProcessingPending)
                            return this.cancelReading(!0, l.Stopped),
                            this.logErrorTelemetry(n.ReadAloudErrors.ReadingNavigatorInitializeFailure),
                            !1;
                        switch (e) {
                        case o.UnitDirection.Previous:
                            return this._readingNavigator.moveToPreviousUnitAsync();
                        case o.UnitDirection.Next:
                            return this.updateCharacterCount(),
                            this._readingNavigator.moveToNextUnitAsync();
                        case o.UnitDirection.Current:
                            return this.getReadingState() === l.Playing && this.updateCharacterCount(),
                            !0;
                        default:
                            return !0
                        }
                    }
                    )).then((i=>{
                        if (this._isProcessingPending)
                            if (i) {
                                let i = this.createSpeechUtterances(this._readingNavigator.getCurrentUnit());
                                i && i.length > 0 ? (i.forEach((e=>{
                                    this._noOfTimesSpeechSynthesisInvoked++,
                                    this._speechSynthesis.speak(e)
                                }
                                )),
                                this._isProcessingPending = !1) : (this._isProcessingPending = !1,
                                this.continueReading(e, t, !1))
                            } else
                                this.logSuccessTelemetry(n.ReadAloudStartStates[n.ReadAloudStartStates.ReadAloud_ContentNotAvailable]),
                                this.cancelReading(!0, l.Paused)
                    }
                    )))
                }
                cancelReading(e, t) {
                    (this.getReadingState() === l.Playing || this._speechUtterances.length > 0) && (this._speechSynthesis.pause(),
                    this._speechSynthesis.cancel()),
                    !t || t !== l.Stopped && t !== l.Paused || this.logSuccessTelemetry(l[t]),
                    this._startRequestTime && (this._startRequestTime = 0),
                    this._speechUtterances.forEach((e=>e.release())),
                    this._speechUtterances = [],
                    e && (this.updateCharacterCount(),
                    this.commitCharacterCount(),
                    this.commitClickNavCountAfterROLStarted(),
                    this._readingNavigator.reset()),
                    this._seekToStartReleasableTimer && (this._seekToStartReleasableTimer.release(),
                    this._seekToStartReleasableTimer = null),
                    t && (this.handleSetReadingState(t),
                    t === l.Stopped ? this._highlighter.deactivateDecoration(s.DecorationType.All) : t === l.Paused && this._highlighter.deactivateDecoration(s.DecorationType.ExceptWord)),
                    this._isProcessingPending = !1
                }
                commitClickNavCountAfterROLStarted() {
                    0 !== this._continueClickCountAfterROLStarted && (this._telemetryClient.reportReadOutLoudContinueClickCount(this._contentProvider.getContentType(), this._continueClickCountAfterROLStarted),
                    this._continueClickCountAfterROLStarted = 0)
                }
                getLanguageAsync() {
                    return this._contentProvider.getLanguageAsync(c).then((e=>r.StringUtilities.isNullOrEmpty(e) ? c : e))
                }
                handleSetReadingState(e) {
                    let t = this.getReadingState();
                    this.setReadingState(e),
                    t !== e && this.handleDwellTimeTelemetry()
                }
                resumeReading() {
                    this.getReadingState() === l.Paused && this._speechSynthesis && this.continueReading(o.UnitDirection.Current, h.defaultStartParams)
                }
                createSpeechUtterances(e, i=!1) {
                    let n = [];
                    i || (this._isOnlineVoicePlaying = !this._settings.getVoice().localService);
                    let o = e.textContents;
                    null !== e.textEndOffset && void 0 !== e.textEndOffset && (i || (this._shouldExitAfterReadingCurrentUnit = !0),
                    o = r.StringUtilities.truncateEnd(o, e.textEndOffset)),
                    o = r.StringUtilities.skipStartText(o, e.textStartOffset);
                    let s = r.StringUtilities.adjustTextByLength(o, t.maxUtteranceLength, this._delimiters)
                      , a = e.textStartOffset;
                    return s.forEach((t=>{
                        let o;
                        o = i ? this.createSpeechUtteranceWithoutEventHandlers(t) : this.createSpeechUtterance(e, t, a),
                        n.push(o),
                        a += t.length
                    }
                    )),
                    n
                }
                createSpeechUtteranceWithoutEventHandlers(e) {
                    let t = new SpeechSynthesisUtterance;
                    return t.voice = this._settings.getVoice(),
                    t.rate = this._settings.getReadingRate(),
                    t.lang = this._settings.getVoice().lang,
                    t.text = "TH-TH" === t.lang.toUpperCase() ? e : r.StringUtilities.replaceLinebreaksWithSpaces(e),
                    t
                }
                onUtteranceStartOrResume(e) {
                    if (this._logVoiceUsageTelemetry || 0 != this._startRequestTime) {
                        let e = this._settings.getVoice();
                        e.localService && !this._settings.isOnlineVoiceAvailable() || (this._telemetryClient.reportReadOutLoudVoiceUsage(this._contentProvider.getContentType(), !e.localService),
                        this._logVoiceUsageTelemetry = !1)
                    }
                    this.logSuccessTelemetry(l[l.Playing]),
                    this._highlighter.activateDecoration(s.DecorationType.Background),
                    this.getReadingState() != l.Playing && (this._ignoreUserActionEvents = !0),
                    this.handleSetReadingState(l.Playing),
                    this._continueReadingOnUserActionComplete = !1
                }
                createSpeechUtterance(e, t, i) {
                    let n, r = this.createSpeechUtteranceWithoutEventHandlers(t), u = e=>{
                        let t = d.FeatureList.get();
                        t && t.isPreloadOnStartUtteranceEnabled() && this.preloadTheRestUtterances(e.charIndex, !1),
                        this.onUtteranceStartOrResume(e)
                    }
                    , c = e=>{
                        this.onUtteranceStartOrResume(e)
                    }
                    , g = e=>{
                        if (this._seekToStartForCurrentUnit = !0,
                        this._seekToStartReleasableTimer && (this._seekToStartReleasableTimer.release(),
                        this._seekToStartReleasableTimer = null),
                        n) {
                            let e = this._speechUtterances.findIndex((e=>e === n));
                            e >= 0 && this._speechUtterances.splice(e, 1),
                            n.release(),
                            n = null
                        }
                        if (this.getReadingState() === l.Playing && 0 === this._speechUtterances.length) {
                            if (this._shouldExitAfterReadingCurrentUnit)
                                return this._shouldExitAfterReadingCurrentUnit = !1,
                                void this.stopReading();
                            this.continueReading(o.UnitDirection.Next, h.defaultStartParams)
                        }
                    }
                    , m = e=>{
                        this.logErrorTelemetry(this.getTelemetryMessage(e.error, 0 !== this._startRequestTime)),
                        "synthesis-failed" === e.error ? this.continueReading(o.UnitDirection.Next, h.defaultStartParams) : this.cancelReading(!0, l.Paused)
                    }
                    , _ = t=>{
                        this.getReadingState() === l.Playing && "word" === t.name && (this._ignoreUserActionEvents = !0,
                        this._contentProvider.getContentType() === a.ContentType.PDF && this._continueReadingOnUserActionComplete || (this._highlighter.setWordDecorationPosition(e, i, t),
                        this._highlighter.activateDecoration(s.DecorationType.WordAndLine)),
                        this._readingNavigator.setCurrentUnitTextOffset(i + t.charIndex)),
                        this._ignoreUserActionEvents = !1
                    }
                    ;
                    return r.addEventListener("start", u),
                    r.addEventListener("end", g),
                    r.addEventListener("resume", c),
                    r.addEventListener("error", m),
                    r.addEventListener("boundary", _),
                    n = {
                        value: ()=>r,
                        release: ()=>{
                            r.removeEventListener("start", u),
                            r.removeEventListener("end", g),
                            r.removeEventListener("resume", c),
                            r.removeEventListener("error", m),
                            r.removeEventListener("boundary", _)
                        }
                    },
                    this._speechUtterances.push(n),
                    n.value()
                }
                logSuccessTelemetry(e) {
                    0 != this._startRequestTime && (this._settings.getVoice() ? this._telemetryClient.reportReadOutLoudSuccess(e, !this._settings.getVoice().localService, Date.now() - this._startRequestTime) : this._telemetryClient.reportReadOutLoudSuccess(e, !1, Date.now() - this._startRequestTime),
                    this._startRequestTime = 0)
                }
                getTelemetryMessage(e, t) {
                    switch (e) {
                    case "network":
                        return t ? n.ReadAloudErrors.SpeechUtteranceCreationFailure_Network_OnStart : n.ReadAloudErrors.SpeechUtteranceCreationFailure_Network;
                    case "synthesis-failed":
                        return t ? n.ReadAloudErrors.SpeechUtteranceCreationFailure_SynthesisFailed_OnStart : n.ReadAloudErrors.SpeechUtteranceCreationFailure_SynthesisFailed;
                    case "text-too-long":
                        return t ? n.ReadAloudErrors.SpeechUtteranceCreationFailure_TextTooLong_OnStart : n.ReadAloudErrors.SpeechUtteranceCreationFailure_TextTooLong;
                    default:
                        return !1 === this._settings.getVoice().localService ? t ? n.ReadAloudErrors.SpeechUtteranceCreationFailureForOnlineVoice_OnStart : n.ReadAloudErrors.SpeechUtteranceCreationFailureForOnlineVoice : t ? n.ReadAloudErrors.SpeechUtteranceCreationFailure_OnStart : n.ReadAloudErrors.SpeechUtteranceCreationFailure
                    }
                }
                logErrorTelemetry(e) {
                    this._telemetryClient.reportReadOutLoudInternalError(e),
                    this._startRequestTime = 0
                }
                ensureNavigationEventListeners() {
                    this._userActionStartedListenerReleasable || (this._userActionStartedListenerReleasable = this.addUserActionStartedListener()),
                    this._userActionCompletedListenerReleasable || (this._userActionCompletedListenerReleasable = this.addUserActionCompletedListener())
                }
                ensureSpeechSynthesis() {
                    this._speechSynthesis || (this._speechSynthesis = this._settings.getSpeechSynthesis())
                }
                ensureDelimiters(e) {
                    this._delimiters || (this._delimiters = 0 === e.indexOf("en") ? [".", ";", ","] : [".", "。", ";", ",", " ", "-"])
                }
                handleDwellTimeTelemetry() {
                    switch (this.getReadingState()) {
                    case l.Playing:
                        this.startDwellTime();
                        break;
                    case l.Paused:
                        this.pauseDwellTime();
                        break;
                    case l.Stopped:
                        this.commitDwellTime()
                    }
                }
                startDwellTime() {
                    this._dwellTimeStart = Date.now()
                }
                pauseDwellTime() {
                    0 !== this._dwellTimeStart && (this._dwellTimeDuration += Date.now() - this._dwellTimeStart,
                    this._dwellTimeStart = 0)
                }
                commitDwellTime() {
                    this.pauseDwellTime(),
                    0 !== this._dwellTimeDuration && (this._telemetryClient.reportReadOutLoudDwellTime(this._contentProvider.getContentType(), this._dwellTimeDuration),
                    this._dwellTimeDuration = 0)
                }
                updateCharacterCount() {
                    this._readingNavigator.getCurrentUnit() && (this._characterCount += this._readingNavigator.getCurrentUnit().textStartOffset)
                }
                commitCharacterCount() {
                    0 !== this._characterCount && (this._telemetryClient.reportReadOutLoudCharacterCount(this._contentProvider.getContentType(), this._characterCount, this._isOnlineVoicePlaying),
                    this._characterCount = 0)
                }
            }
            h.defaultStartParams = {
                startRequestTime: 0,
                startType: u.Default,
                startPosition: {
                    x: 0,
                    y: 0
                },
                needsTransformOfStartPosition: !1
            },
            t.ReadOutLoudViewModel = h
        }
        ,
        7127: (e,t)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.ReadingPreferencesEventHandlers = void 0,
            t.ReadingPreferencesEventHandlers = class {
                constructor(e, t) {
                    this._releasables = [],
                    this._hostProxy = e,
                    this._mainViewModel = t,
                    this._readingPreferencesViewModel = null,
                    this.registerHostEventHandlers(),
                    this._isInitialized = !1
                }
                reset() {
                    this._releasables.forEach((e=>{
                        e.release()
                    }
                    )),
                    this._releasables = [],
                    this._readingPreferencesViewModel = null
                }
                ensureInitialize() {
                    if (!this._isInitialized && (this._mainViewModel.initializeLearningTools(),
                    this._readingPreferencesViewModel = this._mainViewModel.getReadingPreferencesViewModel(),
                    this._readingPreferencesViewModel)) {
                        let e = ()=>{
                            this._hostProxy.sendReadingPreferencesPaneStatus(this._readingPreferencesViewModel.readingPreferencesPaneStatus())
                        }
                        ;
                        this._releasables.push(this._readingPreferencesViewModel.onReadingPreferencesStatusChanged().subscribe((()=>{
                            e()
                        }
                        ))),
                        this._releasables.push(this._readingPreferencesViewModel.onLineFocusExit().subscribe((e=>{
                            this._hostProxy.onLineFocusExit(e)
                        }
                        ))),
                        e()
                    }
                }
                registerHostEventHandlers() {
                    this._hostProxy.readingPreferencesInitialPaneStatusRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._hostProxy.sendReadingPreferencesPaneStatus(this._readingPreferencesViewModel.readingPreferencesPaneStatus())
                    }
                    )),
                    this._hostProxy.enableLineFocusRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.enableLineFocus(e)
                    }
                    )),
                    this._hostProxy.disableLineFocusRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.disableLineFocus(e)
                    }
                    )),
                    this._hostProxy.onContentShifted().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.onContentShifted()
                    }
                    )),
                    this._hostProxy.setNumberOfLinesInFocusRequested().subscribe((e=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.setNumberOfLinesInFocus(e)
                    }
                    )),
                    this._hostProxy.upButtonClicked().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.moveToPreviousInLineFocus()
                    }
                    )),
                    this._hostProxy.downButtonClicked().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.moveToNextInLineFocus()
                    }
                    )),
                    this._hostProxy.enablePictureDictionaryRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.enablePictureDictionary()
                    }
                    )),
                    this._hostProxy.disablePictureDictionaryRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.disablePictureDictionary()
                    }
                    )),
                    this._hostProxy.languageChangeRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.onLanguageChangeRequested()
                    }
                    )),
                    this._hostProxy.pictureDictionaryPopupHidden().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.handlePictureDictionaryPopupClose()
                    }
                    )),
                    this._hostProxy.hidePictureDictionaryPopupRequested().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.hidePictureDictionaryPopupRequested()
                    }
                    )),
                    this._hostProxy.languageChangeRequestCompleted().subscribe((()=>{
                        this.ensureInitialize(),
                        this._readingPreferencesViewModel.onLanguageChangeRequestCompleted()
                    }
                    ))
                }
            }
        }
        ,
        3328: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.WebContentProvider = void 0;
            const n = i(562)
              , o = i(864)
              , s = i(9762)
              , r = i(3755)
              , a = i(913);
            t.WebContentProvider = class {
                constructor(e, t, i) {
                    this.onSelectionChange = e=>{
                        if (this._isMouseLeftKeyDown || !this._document.getSelection().isCollapsed) {
                            this._selectionTimeoutReleasable ? (this._selectionTimeoutReleasable.release(),
                            this._selectionTimeoutReleasable = null) : this._selectionStart.trigger(void 0);
                            let e = window.setTimeout((()=>{
                                this._selectionEnd.trigger(void 0),
                                this._selectionTimeoutReleasable = null
                            }
                            ), 500);
                            this._selectionTimeoutReleasable = {
                                release: ()=>{
                                    clearTimeout(e)
                                }
                            }
                        }
                    }
                    ,
                    this.onScroll = e=>{
                        this._scrollTimeoutReleasable ? (this._scrollTimeoutReleasable.release(),
                        this._scrollTimeoutReleasable = null) : this._scrollStart.trigger(void 0);
                        let t = window.setTimeout((()=>{
                            this._scrollEnd.trigger(void 0),
                            this._scrollTimeoutReleasable = null
                        }
                        ), 500);
                        this._scrollTimeoutReleasable = {
                            release: ()=>clearTimeout(t)
                        }
                    }
                    ,
                    this.onMouseUp = e=>{
                        this._isMouseLeftKeyDown = !1
                    }
                    ,
                    this.onMouseDown = e=>{
                        0 === e.button && (this._isMouseLeftKeyDown = !0)
                    }
                    ,
                    this._document = i,
                    this._hostProxy = e,
                    this._currentFrame = t,
                    this._selectionTimeoutReleasable = null,
                    this._selectionStart = new o.EventSource,
                    this._selectionEnd = new o.EventSource,
                    this._scrollTimeoutReleasable = null,
                    this._scrollStart = new o.EventSource,
                    this._scrollEnd = new o.EventSource,
                    this._isRTL = this.isContentDirectionRTL(i),
                    this._isMouseLeftKeyDown = !1,
                    this._document.addEventListener("selectionchange", this.onSelectionChange),
                    this._document.addEventListener("scroll", this.onScroll, !0),
                    this._document.addEventListener("mousedown", this.onMouseDown),
                    this._document.addEventListener("mouseup", this.onMouseUp)
                }
                getContentType() {
                    return n.ContentType.Web
                }
                isRTL() {
                    return this._isRTL
                }
                getCurrentDocument() {
                    return this._document
                }
                getLocalizedLearningToolsLabels() {
                    throw new Error("Method not implemented.")
                }
                getDocumentStartRange() {
                    throw new Error("Method not implemented.")
                }
                onSelectionStart() {
                    return this._selectionStart
                }
                onSelectionEnd() {
                    return this._selectionEnd
                }
                collapseSelectionToNode(e, t) {
                    this._document.getSelection().collapse(e, t)
                }
                resetSelection(e) {
                    (e || this._document.getSelection().isCollapsed) && this.resetSelectionInternal()
                }
                onScrollStart() {
                    return this._scrollStart
                }
                onScrollEnd() {
                    return this._scrollEnd
                }
                isElementVisible(e, t, i) {
                    return !(t.top < 0 || t.left < 0 || t.bottom > this._document.defaultView.innerHeight || t.right > this._document.defaultView.innerWidth || i && this._document.elementFromPoint((t.left + t.right) / 2, (t.top + t.bottom) / 2) !== e)
                }
                scrollElementIntoView(e, t, i) {
                    return new Promise((n=>this.isElementVisible(e, t, !0) ? n(!0) : (i = i || this.getScrollContainer(e)) === this._document.body ? (this.scrollToElementRectInBody(t),
                    n(!0)) : (this.scrollElementInContainer(e, t, i),
                    i = this.getScrollContainer(i),
                    void this.scrollElementIntoView(e, e.getBoundingClientRect(), i).then((e=>n(e))))))
                }
                getLanguageAsync(e) {
                    return new Promise((t=>{
                        let i, n = this._hostProxy.languageDetected().subscribe((o=>(n.release(),
                        window.clearTimeout(i),
                        t("und" != o ? o : e))));
                        i = window.setTimeout((()=>(n.release(),
                        t(e))), 2e3),
                        this._hostProxy.detectLanguage(this._currentFrame)
                    }
                    ))
                }
                getPrimaryContent() {
                    return new Promise(((e,t)=>{
                        let i, n = this._hostProxy.sdPrimaryContentFetched().subscribe((o=>(n.release(),
                        window.clearTimeout(i),
                        a.SmartReadAloudUtils.parseSdPrimaryContent(o, e, t))));
                        i = window.setTimeout((()=>(n.release(),
                        t(new Error(a.SmartReadParseError.ContentFetchTimeout)))), 3e3),
                        this._hostProxy.fetchSDPrimaryContent()
                    }
                    ))
                }
                isContentDirectionRTL(e) {
                    let t, i = null;
                    return t = e.querySelector("main"),
                    t && (i = t.getAttribute("dir")),
                    s.StringUtilities.isNullOrEmpty(i) && e.body && (i = e.body.dir),
                    s.StringUtilities.isNullOrEmpty(i) && e.head && (i = e.head.dir),
                    !(s.StringUtilities.isNullOrEmpty(i) && e.documentElement && (i = e.documentElement.dir,
                    s.StringUtilities.isNullOrEmpty(i))) && "rtl" === i
                }
                resetSelectionInternal() {
                    let e = document.querySelector("main");
                    for (; e && (e.nodeType !== Node.TEXT_NODE || !s.StringUtilities.NONEMPTY_STRING_REGEX.test(e.textContent)); )
                        e = r.ReadingNavigationUtils.shouldSkipNode(e) ? r.ReadingNavigationUtils.getNextSubtreeNode(e.ownerDocument.body, e) : r.ReadingNavigationUtils.getNextReadingNode(e.ownerDocument.body, e);
                    e ? this.collapseSelectionToNode(e, 0) : this._document.body && this.collapseSelectionToNode(this._document.body, 0)
                }
                scrollElementInContainer(e, t, i) {
                    let n = i.getBoundingClientRect();
                    (t.top < n.top || t.bottom > n.bottom) && (i.scrollTop = i.scrollTop + t.top - n.top),
                    (t.left < n.left || t.right > n.right) && (this._isRTL ? i.scrollLeft = i.scrollLeft + n.right - t.right : i.scrollLeft = i.scrollLeft + t.left - n.left)
                }
                scrollToElementRectInBody(e) {
                    let t = e.top - this._document.defaultView.innerHeight / 2;
                    this._isRTL ? this._document.defaultView.scrollBy(e.right - window.innerWidth, t) : this._document.defaultView.scrollBy(e.left, t)
                }
                getScrollContainer(e) {
                    for (e = e.parentElement; e && e !== this._document.body; ) {
                        let t = e.clientHeight > 0 && e.scrollHeight > e.clientHeight
                          , i = e.clientWidth > 0 && e.scrollWidth > e.clientWidth;
                        if (t || i)
                            return e;
                        e = e.parentElement
                    }
                    return this._document.body
                }
            }
        }
        ,
        1242: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.WebReadingHighlighter = void 0;
            const n = i(262)
              , o = i(9612)
              , s = i(4195)
              , r = i(8261)
              , a = i(4912);
            class d {
                constructor(e) {
                    this._currentReadingUnit = null,
                    this._currentUtteranceText = "",
                    this._isReadingUnitDirty = !1,
                    this._wordDecorationReleasableResource = null,
                    this._lineDecorationReleasableResource = null,
                    this._isLineDecorationHidden = !1,
                    this._webContentProvider = e,
                    this._isScrolling = !1,
                    this._shouldScrollIntoView = !0,
                    this._scrollStartReleasable = null,
                    this._scrollEndReleasable = null;
                    const t = a.FeatureList.get();
                    this._shouldConsiderShadowElements = !(!t || !t.isMSNArticleAndSmartReadAloudEnabled())
                }
                setWordDecorationPosition(e, t, i) {
                    if (!(e instanceof n.HTMLReadingUnit))
                        return;
                    let o = e;
                    this._currentReadingUnit !== o && (this._lineTop = null,
                    this._currentReadingUnit = o,
                    this._isReadingUnitDirty = !1,
                    this._isLineDecorationHidden && this._lineDecorationReleasableResource && this.areEqualReadingUnits(this._currentReadingUnit, this._lineDecorationReleasableResource.value().readingUnit) && (this._lineDecorationReleasableResource.value().readingUnit = this._currentReadingUnit,
                    this._wordDecorationReleasableResource.value().readingUnit = this._currentReadingUnit)),
                    this._currentTextOffset = t + i.charIndex,
                    this._currentTextLength = i.charLength,
                    this._currentUtteranceText = i.utterance.text.substr(i.charIndex, this._currentTextLength)
                }
                activateDecoration(e) {
                    this.ensureScrollListenersInitialized(),
                    this._isReadingUnitDirty || (e & o.DecorationType.Line && this.updateLineDecoration(),
                    e & o.DecorationType.Word && this.updateWordDecoration())
                }
                deactivateDecoration(e) {
                    this._shouldScrollIntoView = !0,
                    this.removeScrollListeners(),
                    e & o.DecorationType.Word && (e === o.DecorationType.All ? (this.removeWordDecoration(),
                    this._wordRect = null) : this.hideDecoration(o.DecorationType.Word)),
                    e & o.DecorationType.Line && (e === o.DecorationType.All ? this.removeLineDecoration() : this.hideDecoration(o.DecorationType.Line))
                }
                isWordDecorationValid() {
                    return !!this._wordDecorationReleasableResource
                }
                getWordRect() {
                    return this._wordRect
                }
                updateWordDecoration() {
                    if (this.removeWordDecoration(),
                    !this._isReadingUnitDirty) {
                        let t = s.ReadingRangeManipulations.createRange(this._currentReadingUnit, this._currentTextOffset, this._currentTextLength, this._shouldConsiderShadowElements);
                        if (this._wordDecorationReleasableResource = t ? r.ReadOutLoudHighlighter.surroundTextBySpans(this._currentReadingUnit, t, [d.ReadoutActiveWordClass]) : null,
                        this._wordDecorationReleasableResource) {
                            var e = this._wordDecorationReleasableResource.value().spans[0];
                            this._shouldScrollIntoView || this._isScrolling || !this._wordRect || (this._shouldScrollIntoView = this._webContentProvider.isElementVisible(this._wordDecorationReleasableResource.value().spans[0], this._wordRect, !1)),
                            this._shouldScrollIntoView && this._webContentProvider.scrollElementIntoView(e, this._wordRect)
                        }
                    }
                }
                updateLineDecoration() {
                    let e = s.ReadingRangeManipulations.createRange(this._currentReadingUnit, this._currentTextOffset, this._currentTextLength, this._shouldConsiderShadowElements);
                    if (this._isReadingUnitDirty = !e || e.toString() !== this._currentUtteranceText,
                    this._isReadingUnitDirty && e && (this._isReadingUnitDirty = e.toString().replace(/\s/g, "") !== this._currentUtteranceText.replace(/\s/g, "")),
                    this._isReadingUnitDirty)
                        this.removeLineDecoration();
                    else if (this._wordRect = e.getClientRects().item(0),
                    this._isLineDecorationHidden || !this.isWordInCurrentLineRange()) {
                        this.removeLineDecoration(),
                        this._isLineDecorationHidden = !1,
                        e = s.ReadingRangeManipulations.createRange(this._currentReadingUnit, this._currentTextOffset, this._currentTextLength, this._shouldConsiderShadowElements);
                        let t = this.getLineRange(e);
                        this._lineDecorationReleasableResource = r.ReadOutLoudHighlighter.surroundTextBySpans(this._currentReadingUnit, t, [d.ReadoutActiveLineClass])
                    }
                }
                getLineRange(e) {
                    let t = s.ReadingRangeManipulations.expandToLineRange(e, this._webContentProvider.isRTL(), (e=>e.getClientRects()))
                      , i = t.getClientRects();
                    return this._lineTop = i.item(0).top,
                    this._lineBottom = i.item(0).bottom,
                    this._lineLeft = i.item(0).left,
                    this._lineRight = i.item(i.length - 1).right,
                    t
                }
                isWordInCurrentLineRange() {
                    return this._lineTop === this._wordRect.top && this._lineBottom === this._wordRect.bottom && !(this._lineRight < this._wordRect.left || this._lineLeft > this._wordRect.right)
                }
                hideDecoration(e) {
                    e & o.DecorationType.Line && this._lineDecorationReleasableResource && (this._lineDecorationReleasableResource.value().spans.forEach((e=>{
                        e.classList.add(d.ReadoutInactiveClass)
                    }
                    )),
                    this._isLineDecorationHidden = !0),
                    e & o.DecorationType.Word && this._wordDecorationReleasableResource && this._wordDecorationReleasableResource.value().spans.forEach((e=>{
                        e.classList.add(d.ReadoutInactiveClass)
                    }
                    ))
                }
                removeWordDecoration() {
                    this._wordDecorationReleasableResource && (this._wordDecorationReleasableResource.release(),
                    this._wordDecorationReleasableResource = null)
                }
                removeLineDecoration() {
                    this._lineDecorationReleasableResource && (this._lineDecorationReleasableResource.release(),
                    this._lineDecorationReleasableResource = null,
                    this._lineTop = null,
                    this._lineRight = null,
                    this._lineLeft = null,
                    this._lineBottom = null)
                }
                ensureScrollListenersInitialized() {
                    null === this._scrollStartReleasable && (this._scrollStartReleasable = this._webContentProvider.onScrollStart().subscribe((()=>{
                        this._shouldScrollIntoView = !1,
                        this._isScrolling = !0
                    }
                    ))),
                    null === this._scrollEndReleasable && (this._scrollEndReleasable = this._webContentProvider.onScrollEnd().subscribe((()=>{
                        this._isScrolling = !1,
                        this._wordDecorationReleasableResource && this._wordRect && (this._shouldScrollIntoView = this._webContentProvider.isElementVisible(this._wordDecorationReleasableResource.value().spans[0], this._wordRect, !1))
                    }
                    )))
                }
                removeScrollListeners() {
                    this._scrollStartReleasable && (this._scrollStartReleasable.release(),
                    this._scrollStartReleasable = null),
                    this._scrollEndReleasable && (this._scrollEndReleasable.release(),
                    this._scrollEndReleasable = null)
                }
                areEqualReadingUnits(e, t) {
                    if (e && t) {
                        var i = e.contentNodes
                          , n = t.contentNodes;
                        return i.length === n.length && i.every(((e,t)=>e === n[t]))
                    }
                    return !1
                }
            }
            d.ReadoutActiveWordClass = "msreadout-word-highlight",
            d.ReadoutActiveLineClass = "msreadout-line-highlight",
            d.ReadoutInactiveClass = "msreadout-inactive-highlight",
            t.WebReadingHighlighter = d
        }
        ,
        3689: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.WebReadingNavigator = void 0;
            const n = i(5002)
              , o = i(8095)
              , s = i(949)
              , r = i(4912);
            class a extends n.HTMLReadingNavigator {
                constructor(e, t) {
                    super(e, t);
                    const i = r.FeatureList.get();
                    this._isReadAloudSemanticDocumentReadingEnabled = i && i.isReadAloudSDExtractionEnabled(),
                    this._isSmartReadExperienceChangesEnabled = i && i.isSmartReadExperienceChangesEnabled(),
                    this._webContentProvider = e
                }
                deepCopy() {
                    let e = new a(this._webContentProvider,this._telemetryClient);
                    return e._readingUnitNavigator = new s.ReadingUnitNavigator,
                    Object.assign(e._readingUnitNavigator, this._readingUnitNavigator),
                    e._readingUnit = e._readingUnitNavigator.getCurrentUnit(),
                    e
                }
                resetSelection(e) {
                    this._webContentProvider.resetSelection(e)
                }
                collapseSelectionToNode(e, t) {
                    this._webContentProvider.collapseSelectionToNode(e, t)
                }
                isCuratedContentBasedNavigationSupported(e) {
                    return !!this._isReadAloudSemanticDocumentReadingEnabled && (e.startType === o.StartType.Default || this._isSmartReadExperienceChangesEnabled && e.startType === o.StartType.ReadFromPoint)
                }
            }
            t.WebReadingNavigator = a
        }
        ,
        2991: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.WebMainViewModel = void 0;
            const n = i(8039)
              , o = i(3689)
              , s = i(1242)
              , r = i(3328)
              , a = i(1165);
            t.WebMainViewModel = class {
                constructor(e, t) {
                    this._readOutLoudViewModel = null,
                    this._settingsViewModel = null,
                    this._hostProxy = e,
                    this._currentFrame = t
                }
                initializeReadOutLoud(e, t) {
                    let i = this._hostProxy.getTelemetryClient();
                    this._webContentProvider = new r.WebContentProvider(this._hostProxy,this._currentFrame,document);
                    var d = new o.WebReadingNavigator(this._webContentProvider,i)
                      , l = new s.WebReadingHighlighter(this._webContentProvider);
                    this._settingsViewModel = new n.ReadOutLoudSettingsViewModel(e,t,i),
                    this._readOutLoudViewModel = new a.WebReadOutLoudViewModel(d,l,this._settingsViewModel,this._webContentProvider,i)
                }
                initializeLearningTools() {
                    throw new Error("Method not implemented.")
                }
                getComprehensionToolsViewModel() {
                    throw new Error("Method not implemented.")
                }
                getReadingPreferencesViewModel() {
                    throw new Error("Method not implemented.")
                }
                getReadOutLoudViewModel() {
                    return this._readOutLoudViewModel
                }
                getReadOutLoudSettingsViewModel() {
                    return this._settingsViewModel
                }
            }
        }
        ,
        1165: (e,t,i)=>{
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.WebReadOutLoudViewModel = void 0;
            const n = i(8095)
              , o = i(2554)
              , s = i(6164)
              , r = i(864)
              , a = i(9612)
              , d = i(4912);
            class l extends n.ReadOutLoudViewModel {
                constructor(e, t, i, o, s) {
                    super(e, t, i, s, o);
                    const a = d.FeatureList.get();
                    this._isSmartReadExperienceChangesEnabled = a && a.isSmartReadExperienceChangesEnabled(),
                    this._readingStateChanged = new r.EventSource,
                    this._readingState = n.ReadingState.Uninitialized,
                    this._webContentProvider = o,
                    this._webReadingHighlighter = t,
                    this._overrideIsPositionValid = !1
                }
                getReadingState() {
                    return this._readingState
                }
                readingStateChanged() {
                    return this._readingStateChanged
                }
                setReadingState(e) {
                    this._readingState !== e && (this._readingState = e,
                    this._readingStateChanged.trigger(void 0))
                }
                onUserActionStarted(e) {
                    this._isSmartReadExperienceChangesEnabled || this._ignoreUserActionEvents || this.getReadingState() !== n.ReadingState.Playing || (this._continueReadingOnUserActionComplete = !0,
                    this.cancelReading(!1),
                    this._webReadingHighlighter.deactivateDecoration(a.DecorationType.Line))
                }
                onUserActionCompleted(e) {
                    this._isSmartReadExperienceChangesEnabled || this._ignoreUserActionEvents || !this._continueReadingOnUserActionComplete || (this.resetReadSelection(),
                    this._continueClickCountAfterROLStarted++,
                    this._readingNavigator.isCuratedContentNavigatorInUse() && this._telemetryClient.reportReadOutLoudSmartReadStatus(o.SmartReadStatus.UserInitiatedFallbackClick),
                    this.continueReading(s.UnitDirection.Next, {
                        startType: n.StartType.ReadFromWordSelection,
                        startRequestTime: 0,
                        startPosition: {
                            x: 0,
                            y: 0
                        },
                        needsTransformOfStartPosition: !0
                    }, !0))
                }
                addUserActionStartedListener() {
                    return this._webContentProvider.onSelectionStart().subscribe((()=>{
                        this._readingState === n.ReadingState.Playing && (this._overrideIsPositionValid = !0),
                        this.onUserActionStarted()
                    }
                    ))
                }
                addUserActionCompletedListener() {
                    return this._webContentProvider.onSelectionEnd().subscribe((()=>{
                        this.onUserActionCompleted(),
                        this._overrideIsPositionValid = !1
                    }
                    ))
                }
                isReadingPositionValid() {
                    return !this._overrideIsPositionValid && this._webContentProvider.getCurrentDocument().getSelection().isCollapsed && this._webReadingHighlighter.isWordDecorationValid()
                }
            }
            t.WebReadOutLoudViewModel = l
        }
        ,
        6609: (e,t)=>{
            var i, n;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }),
            t.NlxStatus = t.ThemeType = void 0,
            (n = t.ThemeType || (t.ThemeType = {}))[n.Light = 0] = "Light",
            n[n.Dark = 1] = "Dark",
            (i = t.NlxStatus || (t.NlxStatus = {}))[i.Success = 0] = "Success",
            i[i.NetworkErrorInternetDisconnected = 1] = "NetworkErrorInternetDisconnected",
            i[i.NetworkErrorRetryAfterSometime = 2] = "NetworkErrorRetryAfterSometime",
            i[i.NetworkErrorBrowserNeedsToBeUpdated = 3] = "NetworkErrorBrowserNeedsToBeUpdated",
            i[i.NetworkErrorUnexpected = 4] = "NetworkErrorUnexpected",
            i[i.NetworkErrorUnknown = 5] = "NetworkErrorUnknown",
            i[i.LanguageNotSupported = 6] = "LanguageNotSupported"
        }
    }
      , t = {};
    function i(n) {
        var o = t[n];
        if (void 0 !== o)
            return o.exports;
        var s = t[n] = {
            id: n,
            exports: {}
        };
        return e[n].call(s.exports, s, s.exports, i),
        s.exports
    }
    i.n = e=>{
        var t = e && e.__esModule ? ()=>e.default : ()=>e;
        return i.d(t, {
            a: t
        }),
        t
    }
    ,
    i.d = (e,t)=>{
        for (var n in t)
            i.o(t, n) && !i.o(e, n) && Object.defineProperty(e, n, {
                enumerable: !0,
                get: t[n]
            })
    }
    ,
    i.o = (e,t)=>Object.prototype.hasOwnProperty.call(e, t),
    i.r = e=>{
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
            value: "Module"
        }),
        Object.defineProperty(e, "__esModule", {
            value: !0
        })
    }
    ,
    i.nc = void 0,
    (()=>{
        const e = i(9351)
          , t = i(2991)
          , n = i(2554)
          , o = i(8157)
          , s = i(4577)
          , r = i(4560);
        i(7951);
        class a extends o.LearningToolsRuntime {
            constructor() {
                super()
            }
            initialize(i) {
                super.initialize(i),
                window.addEventListener("error", (t=>{
                    var i = JSON.stringify({
                        hostName: "Browser",
                        featureName: "ReadOutLoud",
                        eventName: "ReadOutLoud_Error",
                        errorID: n.ReadAloudErrors.GlobalScriptError.toString()
                    });
                    this.postMessageToHost(e.HostProxy.TelemetryMessage, [i])
                }
                ));
                var o = {
                    frameTreeNodeId: Number(i[0]),
                    processId: Number(i[1])
                }
                  , a = new r.LearningToolsHostProxy(this)
                  , d = new s.LearningToolsCore
                  , l = new t.WebMainViewModel(a,o);
                d.initializeReadOutLoud(a, l, !0);
                let u = [e.HostProxy.ReadOutLoudInitializeSettingsCommand, i[0], i[1], i[3], i[4]];
                this.raiseMessageFromHost(u)
            }
        }
        let d = new a;
        window.learningToolsRuntime = d
    }
    )()
}
)();
